Skip to content
Snippets Groups Projects
Commit bef1ae85 authored by Bartek Wrona's avatar Bartek Wrona Committed by Dan Notestein
Browse files

Added partial indexes to optimize reset_blacklist and similar calls.

parent d990332b
No related branches found
No related tags found
2 merge requests!827Merge develop changes to master,!686One of hive_follows indexes extended by `id` column to eliminate HEAP sort...
......@@ -120,6 +120,9 @@ class DbState:
'hive_follows_follower_following_state_idx',
'hive_follows_block_num_idx',
'hive_follows_created_at_idx',
'hive_follows_follower_where_blacklisted_idx',
'hive_follows_follower_where_follow_muted_idx',
'hive_follows_follower_where_follow_blacklists_idx',
'hive_posts_parent_id_id_idx',
'hive_posts_depth_idx',
'hive_posts_root_id_id_idx',
......
......@@ -293,6 +293,9 @@ def build_metadata():
sa.Index('hive_follows_follower_following_state_idx', 'follower', 'following', 'state'),
sa.Index('hive_follows_block_num_idx', 'block_num'),
sa.Index('hive_follows_created_at_idx', 'created_at'),
sa.Index('hive_follows_follower_where_blacklisted_idx', 'follower', postgresql_where=sql_text('blacklisted')),
sa.Index('hive_follows_follower_where_follow_muted_idx', 'follower', postgresql_where=sql_text('follow_muted')),
sa.Index('hive_follows_follower_where_follow_blacklists_idx', 'follower', postgresql_where=sql_text('follow_blacklists')),
)
sa.Table(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment