Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2016-02-24 23:11:03 +0300
committerArthur Schiwon <blizzz@owncloud.com>2016-02-24 23:48:12 +0300
commit9250704ecb2af58f455169ab8fb92428584e6488 (patch)
treea6460c3714481cb24ffcb2fde661095308440eb5 /db_structure.xml
parentfaf65e73b778867d36f0e13dd1b0f1a4ef1f4723 (diff)
add index definitions for comments tables
Diffstat (limited to 'db_structure.xml')
-rw-r--r--db_structure.xml51
1 files changed, 41 insertions, 10 deletions
diff --git a/db_structure.xml b/db_structure.xml
index b1242171127..acdd2a5a577 100644
--- a/db_structure.xml
+++ b/db_structure.xml
@@ -1541,8 +1541,7 @@
<notnull>true</notnull>
<length>64</length>
</field>
-<!--
- TODO: finalize indexes when all queries are done
+
<index>
<name>comments_parent_id_index</name>
<unique>false</unique>
@@ -1553,15 +1552,11 @@
</index>
<index>
- <name>comments_actor_index</name>
+ <name>comments_topmost_parent_id_idx</name>
<unique>false</unique>
<field>
- <name>actor_type</name>
- <sorting>ascending</sorting>
- </field>
- <field>
- <name>actor_id</name>
- <sorting>ascending</sorting>
+ <name>topmost_parent_id</name>
+ <sorting>descending</sorting>
</field>
</index>
@@ -1580,8 +1575,21 @@
<name>creation_timestamp</name>
<sorting>descending</sorting>
</field>
+ <!-- TODO: check whether this supports a query without creation timestamp -->
+ </index>
+
+ <index>
+ <name>comments_actor_index</name>
+ <unique>false</unique>
+ <field>
+ <name>actor_type</name>
+ <sorting>ascending</sorting>
+ </field>
+ <field>
+ <name>actor_id</name>
+ <sorting>ascending</sorting>
+ </field>
</index>
--->
</declaration>
@@ -1626,6 +1634,29 @@
<length>64</length>
</field>
+ <index>
+ <name>comments_marker_user_id_index</name>
+ <unique>false</unique>
+ <field>
+ <name>user_id</name>
+ <sorting>descending</sorting>
+ </field>
+ </index>
+
+ <index>
+ <name>comments_marker_object_index</name>
+ <unique>false</unique>
+ <field>
+ <name>object_type</name>
+ <sorting>ascending</sorting>
+ </field>
+ <field>
+ <name>object_id</name>
+ <sorting>ascending</sorting>
+ </field>
+ <!-- TODO: check whether this supports a query with user_id -->
+ </index>
+
</declaration>
</table>