]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Sort indexing fix for profile sidebar: add group_member_profile_id_created_idx to...
authorBrion Vibber <brion@pobox.com>
Sat, 18 Dec 2010 00:22:26 +0000 (16:22 -0800)
committerBrion Vibber <brion@pobox.com>
Sat, 18 Dec 2010 00:22:26 +0000 (16:22 -0800)
db/096to097.sql
db/statusnet.sql

index 875077e8b8ff9ecf3113e1dab095bd7f7b35edcb..209a3a8811ff0c1aff76acfe613611ce260dfb51 100644 (file)
@@ -21,3 +21,6 @@ alter table group_inbox add index group_inbox_group_id_created_notice_id_idx (gr
 
 -- Helps make some reverse role lookups more efficient if there's a lot of assigned accounts
 alter table profile_role add index profile_role_role_created_profile_id_idx (role, created, profile_id);
+
+-- Fix for sorting a user's group memberships by order joined
+alter table group_member add index group_member_profile_id_created_idx (profile_id, created);
index 0c1697a7e95b2d459d81f4bcb836271f45d5cfa8..4a24d016a286e5a2e2cdaffc7314543a5568cb64 100644 (file)
@@ -463,7 +463,10 @@ create table group_member (
 
     constraint primary key (group_id, profile_id),
     index group_member_profile_id_idx (profile_id),
-    index group_member_created_idx (created)
+    index group_member_created_idx (created),
+
+    -- To pull up a list of someone's groups in order joined
+    index group_member_profile_id_created_idx (profile_id, created)
 
 ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;