Your table bb is not indexed in a way that helps this query. Creating an
index on min_number may help somewhat.
If your intervals DON'T overlap each other, there's probably a much
better
algorithm for you to use than an SQL join. (e.g., select each number
from aa
in sequence, form a query for
Hi!
Here is a worst case i have even seem so far:
create table aa(
some_numberint unsigned not null,
indexaa_sn (some_number)
);
create table bb(
min_numberint unsigned not null,
max_numberint unsigned not null,
range_typechar(1) not null,
primary