From 4a37d565bd2b3c5972c329cbb3e1d5f07206ff09 Mon Sep 17 00:00:00 2001
From: Morris Jobke <hey@morrisjobke.de>
Date: Wed, 8 Jul 2015 18:04:10 +0200
Subject: [PATCH] Add indexes to speedup DB queries

* file_target is often used in the sharing code in JOIN statements for retrieval of shares
---
 db_structure.xml | 15 +++++++++++++++
 version.php      |  2 +-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/db_structure.xml b/db_structure.xml
index 05d8dfb132..7769c64d87 100644
--- a/db_structure.xml
+++ b/db_structure.xml
@@ -471,6 +471,14 @@
 				</field>
 			</index>
 
+			<index>
+				<name>gu_uid_index</name>
+				<field>
+					<name>uid</name>
+					<sorting>ascending</sorting>
+				</field>
+			</index>
+
 		</declaration>
 
 	</table>
@@ -859,6 +867,13 @@
 					<sorting>ascending</sorting>
 				</field>
 			</index>
+			<index>
+				<name>share_file_target</name>
+				<field>
+					<name>file_target</name>
+					<sorting>ascending</sorting>
+				</field>
+			</index>
 		</declaration>
 
 	</table>
diff --git a/version.php b/version.php
index 341e82671e..1e112ca86d 100644
--- a/version.php
+++ b/version.php
@@ -22,7 +22,7 @@
 // We only can count up. The 4. digit is only for the internal patchlevel to trigger DB upgrades
 // between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
 // when updating major/minor version number.
-$OC_Version=array(8, 2, 0, 0);
+$OC_Version=array(8, 2, 0, 1);
 
 // The human readable string
 $OC_VersionString='8.2 pre alpha';
-- 
GitLab