Hi I have two tables:
T1
---------
sequence start end
T2
---------
id pos
T1 is a small table (~1000 rows) and T2 is large (~5 million rows)
The tables are indexed properly, but the following query is extremely slow:
select * from T2, T1 where pos >= start and pos <= end;
Is there a better way to do this query? I dont believe mysql uses
indexes with a query like this (?).
Thanks,
Bryan
T1
---------
sequence start end
T2
---------
id pos
T1 is a small table (~1000 rows) and T2 is large (~5 million rows)
The tables are indexed properly, but the following query is extremely slow:
select * from T2, T1 where pos >= start and pos <= end;
Is there a better way to do this query? I dont believe mysql uses
indexes with a query like this (?).
Thanks,
Bryan
Comment