diff options
author | Brion Vibber <brion@pobox.com> | 2009-11-10 08:23:24 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2009-11-10 08:23:24 -0800 |
commit | 9d0687b0559095f270a55af3467c53ad29bfd4c7 (patch) | |
tree | a64ad03aa33ee8c6973026dbc880c6006a84ef6e /db/statusnet_pg.sql | |
parent | 486dbe6aef380a9057c5ac609cd1c6086a5e34fc (diff) |
Adjusting indexes to make favorites query more efficient, based on feedback from ops.
fave_user_id_idx index changed from (user_id) to (user_id,modified), so the timestamp ordering can be done straight from the index while we're looking up the user's notices.
Added to 08to09.sql and 08to09_pg.sql; may need to be run manually by folks doing development.
(No harm if you don't update it, the favorites tab/rss feed will just stay inefficent.)
Diffstat (limited to 'db/statusnet_pg.sql')
-rw-r--r-- | db/statusnet_pg.sql | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/db/statusnet_pg.sql b/db/statusnet_pg.sql index 0e5e96c32..710883e57 100644 --- a/db/statusnet_pg.sql +++ b/db/statusnet_pg.sql @@ -171,7 +171,7 @@ create table fave ( ); create index fave_notice_id_idx on fave using btree(notice_id); -create index fave_user_id_idx on fave using btree(user_id); +create index fave_user_id_idx on fave using btree(user_id,modified); create index fave_modified_idx on fave using btree(modified); /* tables for OAuth */ |