[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Don't create an unnecessary index

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Thu, 2 Jun 2011 20:21:36 +0300

* subversion/libsvn_fs_fs/revprops-db.sql
  (i_revision): Drop this index as redundant and overhead-inducing,
     since the UNIQUE directive already creates (another) index.

Found by: philip

Index: subversion/libsvn_fs_fs/revprops-db.sql
--- subversion/libsvn_fs_fs/revprops-db.sql (revision 1124675)
+++ subversion/libsvn_fs_fs/revprops-db.sql (working copy)
@@ -28,8 +28,14 @@
 create table revprop (revision integer UNIQUE not null,
                       properties BLOB not null);
-create index i_revision on revprop (revision);
+/* Unreleased 1.7-dev libraries also contained an index:
+ CREATE INDEX i_revision ON revprop (revision);
+ This was removed since the UNIQUE statement already constructs
+ its own index.
+ */
 pragma user_version = 1;

I'm also attaching the results of 'sqlite3 EXPLAIN INSERT' on
revprops.db, with the index as created by default and then without
the index.

Received on 2011-06-02 19:22:18 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.