Author: rhuijben
Date: Tue Mar 22 12:17:28 2011
New Revision: 1084145
URL: http://svn.apache.org/viewvc?rev=1084145&view=rev
Log:
Update STMT_SELECT_WORKING_CHILDREN to not use the NODES_CURRENT view, as
SQLite creates a complete temporary table for that view before processing
the rest of the query. This reduces the time spend on 'svn ci' to about 10%
of what it was before this patch.
* subversion/libsvn_wc/wc-queries.sql
(STMT_SELECT_WORKING_CHILDREN): Don't use NODES_CURRENT when we can avoid
that.
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=1084145&r1=1084144&r2=1084145&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Tue Mar 22 12:17:28
2011
@@ -173,12 +173,12 @@ WHERE wc_id = ?1 AND parent_relpath = ?2
directory (?1, ?2). A given path is not included just because it is a
child of an underlying (replaced) directory, it has to be in the
working version of the directory. */
-SELECT local_relpath FROM nodes_current
+SELECT local_relpath FROM nodes
WHERE wc_id = ?1 AND parent_relpath = ?2
- AND (op_depth >= (SELECT MAX(op_depth) FROM nodes_current
+ AND (op_depth > (SELECT MAX(op_depth) FROM nodes
WHERE wc_id = ?1 AND local_relpath = ?2)
OR
- (op_depth = (SELECT MAX(op_depth) FROM nodes_current
+ (op_depth = (SELECT MAX(op_depth) FROM nodes
WHERE wc_id = ?1 AND local_relpath = ?2)
AND presence != 'base-deleted'))