-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add network column to indices #1174
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing find 🚀.
Looking at our sql queries should we keep the index for content_id_long? |
I looked more online and again into our queries and made few changes.
I confirmed both by manual inspection and by this post that index is not needed for the primary key or unique column (and it might hurt) because they are automatically created. So I also dropped the index for primary key from I also figured out that:
Please take another look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
What was wrong?
Some of our queries were very slow because our db indices weren't setup correctly.
For example, the
TOTAL_DATA_SIZE_QUERY_DB
query took 20-25 seconds on 4GB database.How was it fixed?
I added
network
column to the indices. Based on Kolby's measurements on the same db, we noticed following improvements:To-Do