> -----Original Message----- > From: rhuij...@apache.org [mailto:rhuij...@apache.org] > Sent: zondag 20 mei 2012 2:45 > To: comm...@subversion.apache.org > Subject: svn commit: r1340603 - in /subversion/trunk/subversion/libsvn_wc: wc- > queries.sql wc_db.c wc_db.h > > Author: rhuijben > Date: Sun May 20 00:44:33 2012 > New Revision: 1340603 > > URL: http://svn.apache.org/viewvc?rev=1340603&view=rev > Log: > Revert all the sqlite query changes I applied in r1340598, r1340592 and > r1340588 until I have the time to find out why I get mixed results. > > * subversion/libsvn_wc/wc-queries.sql > (STMT_DELETE_SHADOWED_RECURSIVE, > STMT_SELECT_BASE_NODE_LOCK_TOKENS_RECURSIVE, > STMT_DELETE_NODES_RECURSIVE, > STMT_INSERT_DELETE_FROM_NODE_RECURSIVE, > STMT_HAS_SERVER_EXCLUDED_NODES, > STMT_INSERT_DELETE_LIST): Revert to before this batch.
The problem was not in not really in using the index, but in the ?2 = '' part of the query to properly handle the working copy root. As Sqlite only uses a single query plan, it notes that it needs a table scan to handle the ?2 = '' extrme case, and forgets the other optimizations. We should split the performance critical queries in a normal and working copy root specific one (if one is necessary) Bert