Re: Cross index join query performance

2013-09-30 Thread Peter Keegan
Ah, got it now - thanks for the explanation. On Sat, Sep 28, 2013 at 3:33 AM, Upayavira wrote: > The thing here is to understand how a join works. > > Effectively, it does the inner query first, which results in a list of > terms. It then effectively does a multi-term query with those values. >

Re: Cross index join query performance

2013-09-28 Thread Upayavira
The thing here is to understand how a join works. Effectively, it does the inner query first, which results in a list of terms. It then effectively does a multi-term query with those values. q=size:large {!join fromIndex=other from=someid to=someotherid}type:shirt Imagine the inner join returned

Re: Cross index join query performance

2013-09-27 Thread Peter Keegan
Hi Joel, I tried this patch and it is quite a bit faster. Using the same query on a larger index (500K docs), the 'join' QTime was 1500 msec, and the 'hjoin' QTime was 100 msec! This was for true for large and small result sets. A few notes: the patch didn't compile with 4.3 because of the SolrCo

Re: Cross index join query performance

2013-09-26 Thread Joel Bernstein
It looks like you are using int join keys so you may want to check out SOLR-4787, specifically the hjoin and bjoin. These perform well when you have a large number of results from the fromIndex. If you have a small number of results in the fromIndex the standard join will be faster. On Wed, Sep

Re: Cross index join query performance

2013-09-25 Thread Peter Keegan
I forgot to mention - this is Solr 4.3 Peter On Wed, Sep 25, 2013 at 3:38 PM, Peter Keegan wrote: > I'm doing a cross-core join query and the join query is 30X slower than > each of the 2 individual queries. Here are the queries: > > Main query: http://localhost:8983/solr/mainindex/select?q=ti