subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1340598 - /subversion/trunk/subversion/libsvn_wc/wc-queries.sql
Date Sun, 20 May 2012 00:10:24 GMT
Author: rhuijben
Date: Sun May 20 00:10:24 2012
New Revision: 1340598

URL: http://svn.apache.org/viewvc?rev=1340598&view=rev
Log:
Optimize the Sqlite queries used by 'svn rm' to use the I_NODES_PARENT index.

* subversion/libsvn_wc/wc-queries.sql
  (STMT_DELETE_NODES_RECURSIVE,
   STMT_INSERT_DELETE_FROM_NODE_RECURSIVE,
   STMT_INSERT_DELETE_LIST): Avoid a table scan by tweaking the query.

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

Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-queries.sql?rev=1340598&r1=1340597&r2=1340598&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Sun May 20 00:10:24 2012
@@ -605,7 +605,8 @@ DELETE FROM nodes
 WHERE wc_id = ?1
   AND (?2 = ''
        OR local_relpath = ?2
-       OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
+       OR parent_relpath = ?2
+       OR IS_STRICT_DESCENDANT_OF(parent_relpath, ?2))
   AND op_depth >= ?3
 
 -- STMT_DELETE_ACTUAL_NODE
@@ -845,7 +846,8 @@ SELECT wc_id, local_relpath, ?4 /*op_dep
 FROM nodes
 WHERE wc_id = ?1
   AND (local_relpath = ?2
-       OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
+       OR parent_relpath = ?2
+       OR IS_STRICT_DESCENDANT_OF(parent_relpath, ?2))
   AND op_depth = ?3
   AND presence NOT IN ('base-deleted', 'not-present', 'excluded', 'absent')
 
@@ -1260,7 +1262,8 @@ INSERT INTO delete_list(local_relpath)
 SELECT local_relpath FROM nodes_current
 WHERE wc_id = ?1
   AND (local_relpath = ?2
-       OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
+       OR parent_relpath = ?2
+       OR IS_STRICT_DESCENDANT_OF(parent_relpath, ?2))
   AND op_depth >= ?3
   AND presence NOT IN ('base-deleted', 'not-present', 'excluded', 'absent')
 



Mime
View raw message