From: <tho...@us...> - 2010-10-20 18:27:28
|
Revision: 3829 http://bigdata.svn.sourceforge.net/bigdata/?rev=3829&view=rev Author: thompsonbry Date: 2010-10-20 18:27:22 +0000 (Wed, 20 Oct 2010) Log Message: ----------- Optimization in AccessPath. It had been modified such that it was no longer hitting the cached index references in SPORelation and LexiconRelation. This fixes that. There is a non-javadoc note in the code which indicates that this fix is a bit of a kludge, but it is the same known kludge which we have been relying on for a long time now - caching of the index references on the concrete IRelation class implementations. Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/relation/accesspath/AccessPath.java Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/relation/accesspath/AccessPath.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/relation/accesspath/AccessPath.java 2010-10-20 18:25:26 UTC (rev 3828) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/relation/accesspath/AccessPath.java 2010-10-20 18:27:22 UTC (rev 3829) @@ -425,11 +425,21 @@ // The predicate is not constrained to an index partition. pmd = null; - // Obtain the index. - final String fqn = AbstractRelation.getFQN(relation, keyOrder); - - ndx = AbstractRelation.getIndex(indexManager, fqn, timestamp); - + /* + * Obtain the index. + * + * FIXME The getIndex(IKeyOrder) code path is optimized by + * SPORelation and LexiconRelation. However, we should have + * automatic caching of the index references to avoid the + * significant penalty of going down to the commitRecordIndex and + * Name2Addr each time we need to resolve an index. (Scale-out has + * separate caching for this in IndexManager.) + */ + ndx = relation.getIndex(keyOrder); +// final String fqn = AbstractRelation.getFQN(relation, keyOrder); +// +// ndx = AbstractRelation.getIndex(indexManager, fqn, timestamp); + if (ndx == null) { throw new RuntimeException("No such index: relation=" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |