MySQL Forums
Forum List  »  Optimizer & Parser

Re: inner join on range criteria: unable to use index?
Posted by: Joseph Fisk
Date: August 12, 2008 12:52PM

OK! I think what I failed to realize was that I know something about the data that mysql doesn't, which is the following: "start" is always smaller than "end" for any given row.

So the query could be written like this:

select * from s inner join r on r.tstart >= s.chrstart and and r.tstart <= s.chrstop and r.tend <= s.chrstop and r.tend >== s.chrstart and r.tname=s.chr and r.strand=s.chrstrand;

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: inner join on range criteria: unable to use index?
3597
August 12, 2008 12:52PM


Sorry, you can't reply to this topic. It has been closed.

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.