]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Switch public timeline to new sorting; new index notice_created_id_is_local_idx
authorBrion Vibber <brion@pobox.com>
Fri, 17 Dec 2010 20:47:50 +0000 (12:47 -0800)
committerBrion Vibber <brion@pobox.com>
Fri, 17 Dec 2010 20:49:02 +0000 (12:49 -0800)
http://status.net/wiki/Sorting_changes

db/096to097.sql [new file with mode: 0644]
db/statusnet.sql

diff --git a/db/096to097.sql b/db/096to097.sql
new file mode 100644 (file)
index 0000000..53f4e97
--- /dev/null
@@ -0,0 +1,3 @@
+-- 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);
index ac48e6253a0274e0c67f27b6fffb52248d4a053c..b372305d0037f67efdfd93e30b8d6957c4c8dfbd 100644 (file)
@@ -131,7 +131,13 @@ create table notice (
     location_ns integer comment 'namespace for location',
     repeat_of integer comment 'notice this is a repeat of' references notice (id),
 
+    -- For public timeline...
+    index notice_created_id_is_local_idx (created,id,is_local),
+
+    -- For profile timelines...
     index notice_profile_id_idx (profile_id,created,id),
+
+    -- Are these enough?
     index notice_conversation_idx (conversation),
     index notice_created_idx (created),
     index notice_replyto_idx (reply_to),