Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Commits
bef1ae85
Commit
bef1ae85
authored
11 months ago
by
Bartek Wrona
Committed by
Dan Notestein
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Added partial indexes to optimize reset_blacklist and similar calls.
parent
d990332b
No related branches found
No related tags found
2 merge requests
!827
Merge develop changes to master
,
!686
One of hive_follows indexes extended by `id` column to eliminate HEAP sort...
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hive/db/db_state.py
+3
-0
3 additions, 0 deletions
hive/db/db_state.py
hive/db/schema.py
+3
-0
3 additions, 0 deletions
hive/db/schema.py
with
6 additions
and
0 deletions
hive/db/db_state.py
+
3
−
0
View file @
bef1ae85
...
...
@@ -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
'
,
...
...
This diff is collapsed.
Click to expand it.
hive/db/schema.py
+
3
−
0
View file @
bef1ae85
...
...
@@ -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
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment