]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - db/096to097.sql
Update sorting on api/statuses/retweets: adds notice_repeat_of_created_id_idx index...
[quix0rs-gnu-social.git] / db / 096to097.sql
index c3f1fb42539a0022d52d75dbac1a32d2e579e54e..5947538da86a5b313697be7446947e8bb825da9e 100644 (file)
@@ -1,7 +1,10 @@
 -- Add indexes for sorting changes in 0.9.7
 
--- Allows sorting public timeline by timestamp efficiently
-alter table notice add index notice_created_id_is_local_idx (created,id,is_local);
+-- Allows sorting public timeline and api/statuses/repeats by timestamp efficiently
+alter table notice
+    add index notice_created_id_is_local_idx (created,id,is_local),
+    drop index notice_repeatof_idx,
+    add index notice_repeat_of_created_id_idx (repeat_of, created, id);
 
 -- Allows sorting tag-filtered public timeline by timestamp efficiently
 alter table notice_tag add index notice_tag_tag_created_notice_id_idx (tag, created, notice_id);