You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2012/12/13 15:20:06 UTC

svn commit: r1421307 - /subversion/trunk/subversion/libsvn_wc/wc-metadata.sql

Author: rhuijben
Date: Thu Dec 13 14:20:05 2012
New Revision: 1421307

URL: http://svn.apache.org/viewvc?rev=1421307&view=rev
Log:
Remove an unused sqlite index from our metadata schema.

We always use changelists on a working copy and below some path, so an index
that just contains changelist names won't help and keeping it up to date slows
down changing the ACTUAL table. (As the index is far from unique, lookups on what
to change are expensive)

* subversion/libsvn_wc/wc-metadata.sql
  (STMT_CREATE_SCHEMA): Remove index creation.
  (STMT_UPGRADE_TO_31): Drop index if it exists.
  (STMT_UPGRADE_TO_32): New statement, to document extra work for future bump.

  (format: 99): Don't recreate index after dropping.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc-metadata.sql

Modified: subversion/trunk/subversion/libsvn_wc/wc-metadata.sql
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-metadata.sql?rev=1421307&r1=1421306&r2=1421307&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-metadata.sql Thu Dec 13 14:20:05 2012
@@ -182,7 +182,6 @@ CREATE TABLE ACTUAL_NODE (
   );
 
 CREATE INDEX I_ACTUAL_PARENT ON ACTUAL_NODE (wc_id, parent_relpath);
-CREATE INDEX I_ACTUAL_CHANGELIST ON ACTUAL_NODE (changelist);
 
 
 /* ------------------------------------------------------------------------- */
@@ -826,6 +825,7 @@ WHERE wc_id = ?1 and local_relpath = ?2
    inherited properties */
 -- STMT_UPGRADE_TO_31
 ALTER TABLE NODES ADD COLUMN inherited_props BLOB;
+DROP INDEX IF EXISTS I_ACTUAL_CHANGELIST;
 
 PRAGMA user_version = 31;
 
@@ -852,6 +852,13 @@ WHERE (l.local_relpath = '' AND l.repos_
                                  '/'))
 
 /* ------------------------------------------------------------------------- */
+/* Format 32 ....  */
+-- STMT_UPGRADE_TO_32
+
+/* Drop old index. ### Remove this part from the upgrade to 31 once bumped */
+DROP INDEX IF EXISTS I_ACTUAL_CHANGELIST;
+
+/* ------------------------------------------------------------------------- */
 
 /* Format YYY introduces new handling for conflict information.  */
 -- format: YYY
@@ -909,7 +916,6 @@ CREATE TABLE ACTUAL_NODE (
   );
 
 CREATE INDEX I_ACTUAL_PARENT ON ACTUAL_NODE (wc_id, parent_relpath);
-CREATE INDEX I_ACTUAL_CHANGELIST ON ACTUAL_NODE (changelist);
 
 INSERT INTO ACTUAL_NODE SELECT
   wc_id, local_relpath, parent_relpath, properties, conflict_old,