]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Squashed commit of the following:
authorEvan Prodromou <evan@status.net>
Thu, 20 Oct 2011 16:50:39 +0000 (12:50 -0400)
committerEvan Prodromou <evan@status.net>
Thu, 20 Oct 2011 16:50:39 +0000 (12:50 -0400)
commit 74c5e4cce42ae601c07b447e100f097c15ebf9d2
Author: Evan Prodromou <evan@status.net>
Date:   Thu Oct 20 12:48:52 2011 -0400

    Add back in some optimization indices lost in schema conversion

commit ef5c2acfcd123b25910a1c8bb4ae01a3f9608e5e
Author: Evan Prodromou <evan@status.net>
Date:   Thu Oct 20 12:29:57 2011 -0400

    restore some of the lost optimized indices on notice table

classes/Group_inbox.php
classes/Group_member.php
classes/Notice.php
classes/Notice_tag.php
classes/Profile_role.php
classes/Reply.php

index 0e01c20b4680413c70479ee8fe13ca06d910051c..fe600cbaf8215a1fd279353fa6d97978f7be45a5 100644 (file)
@@ -37,6 +37,7 @@ class Group_inbox extends Managed_DataObject
             'indexes' => array(
                 'group_inbox_created_idx' => array('created'),
                 'group_inbox_notice_id_idx' => array('notice_id'),
+                'group_inbox_group_id_created_notice_id_idx' => array('group_id', 'created', 'notice_id'),
             ),
         );
     }
index 53743e7f24810f41f30cb8e3ab5ada86065499a5..8873942318b04329512c6b5c8c184ab9365e5e59 100644 (file)
@@ -45,6 +45,8 @@ class Group_member extends Managed_DataObject
                 // @fixme probably we want a (profile_id, created) index here?
                 'group_member_profile_id_idx' => array('profile_id'),
                 'group_member_created_idx' => array('created'),
+                'group_member_profile_id_created_idx' => array('profile_id', 'created'),
+                'group_member_group_id_created_idx' => array('group_id', 'created'),
             ),
         );
     }
index adcc25973c5a093b8a24462f0d61bd97181a4945..9ee5696e3f47a3cb68a8ccb79ca3422edcaccae4 100644 (file)
@@ -122,11 +122,11 @@ class Notice extends Managed_DataObject
                 'notice_repeat_of_fkey' => array('notice', array('repeat_of' => 'id')), # @fixme: what about repeats of deleted notices?
             ),
             'indexes' => array(
+                'notice_created_id_is_local_idx' => array('created', 'id', 'is_local'),
                 'notice_profile_id_idx' => array('profile_id', 'created', 'id'),
-                'notice_conversation_idx' => array('conversation'),
-                'notice_created_idx' => array('created'),
-                'notice_replyto_idx' => array('reply_to'),
-                'notice_repeatof_idx' => array('repeat_of'),
+                'notice_repeat_of_created_id_idx' => array('repeat_of', 'created', 'id'),
+                'notice_conversation_created_id_idx' => array('conversation', 'created', 'id'),
+                'notice_replyto_idx' => array('reply_to')
             )
         );
 
index 77c89dc8ce8713bc0b0306d22cd24302b19dce49..b9cbcd10693a0d4e54228057321bf6d95fe47db4 100644 (file)
@@ -52,6 +52,7 @@ class Notice_tag extends Managed_DataObject
             'indexes' => array(
                 'notice_tag_created_idx' => array('created'),
                 'notice_tag_notice_id_idx' => array('notice_id'),
+                'notice_tag_tag_created_notice_id_idx' => array('tag', 'created', 'notice_id')
             ),
         );
     }
index d89992b842314ad22414a0541f4739a34bc9768b..61ec9ba9df67d5f4d4b471a56d9187b77fd75303 100644 (file)
@@ -55,6 +55,7 @@ class Profile_role extends Managed_DataObject
             'foreign keys' => array(
                 'profile_role_profile_id_fkey' => array('profile', array('profile_id' => 'id')),
             ),
+            'indexes' => array('profile_role_role_created_profile_id_idx' => array('role', 'created', 'profile_id')),
         );
     }
 
index 3cc4b942ca74608a1a9945070dd2a941247c58ce..f2c308fac4ebd7573f2131c00b4523cd1fede39d 100644 (file)
@@ -40,6 +40,7 @@ class Reply extends Managed_DataObject
                 'reply_notice_id_idx' => array('notice_id'),
                 'reply_profile_id_idx' => array('profile_id'),
                 'reply_replied_id_idx' => array('replied_id'),
+                'reply_profile_id_modified_notice_id_idx' => array('profile_id', 'modified', 'notice_id')
             ),
         );
     }