inner join on range criteria: unable to use index?
Hello,
Even after searching for a while I'm having trouble understanding why this query is not faster:
select * from s inner join r on r.tstart >= s.chrstart and r.tend <= s.chrstop and r.tname=s.chr and r.strand=s.chrstrand;
tstart/tend/chrstart/chrstop are all bigint, and of the columns involved in the join, they are the most selective.
I would expect mysql to scan the smaller table, and then take advantage of a multi column index on the larger table on (start, stop, chr, strand), which is in order from most to least selective.
But mysql won't use that index. Why not?
Subject
Views
Written By
Posted
inner join on range criteria: unable to use index?
10709
August 11, 2008 04:34PM
3792
August 11, 2008 05:56PM
3898
August 11, 2008 06:04PM
3708
August 12, 2008 01:38AM
3346
August 12, 2008 09:30AM
3333
August 12, 2008 07:11PM
3827
August 12, 2008 12:52PM
3166
September 26, 2008 11:38PM
Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.