Skip to content

Added/modified indexes for hive_posts and hive_feed_cache to speed up queries

Dan Notestein requested to merge dn_new_indexes into develop

After some reading, I've found that some of our queries can benefit from indexes that are structured to allow for index-only-scans (where the query doesn't have to scan the table itself). Here's the two links I found most useful about this: https://www.postgresql.org/docs/11/indexes-index-only-scans.html https://blog.dbi-services.com/an-index-only-scan-in-postgresql-is-not-always-index-only/ (this latter article was very helpful in troubleshooting where I was going wrong in getting my index-only-scan to be planned)

In particular, it helps a lot with this problematic "bridge_get_account_posts_by_replies" function.

Merge request reports

Loading