Author: rhuijben
Date: Fri Nov 22 22:33:20 2013
New Revision: 1544704
URL: http://svn.apache.org/r1544704
Log:
* subversion/libsvn_wc/wc-queries.sql
(STMT_SELECT_NODE_CHILDREN_INFO): Ask the database for the items in the order
where we don't handle intermediate depths more than we should.
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=1544704&r1=1544703&r2=1544704&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Fri Nov 22 22:33:20
2013
@@ -125,8 +125,9 @@ WHERE wc_id = ?1 AND local_relpath = ?2
-- STMT_SELECT_NODE_CHILDREN_INFO
/* Getting rows in an advantageous order using
ORDER BY local_relpath, op_depth DESC
- turns out to be slower than getting rows in a random order and making the
- C code handle it. */
+ doesn't work as the index is created without the DESC keyword.
+ Using both local_relpath and op_depth descending does work without any
+ performance penalty. */
SELECT op_depth, nodes.repos_id, nodes.repos_path, presence, kind, revision,
checksum, translated_size, changed_revision, changed_date, changed_author,
depth, symlink_target, last_mod_time, properties, lock_token, lock_owner,
@@ -135,6 +136,7 @@ FROM nodes
LEFT OUTER JOIN lock ON nodes.repos_id = lock.repos_id
AND nodes.repos_path = lock.repos_relpath AND op_depth = 0
WHERE wc_id = ?1 AND parent_relpath = ?2
+ORDER BY local_relpath DESC, op_depth DESC
-- STMT_SELECT_NODE_CHILDREN_WALKER_INFO
SELECT local_relpath, op_depth, presence, kind