On 26 Aug 2003 at 19:38, Twibell, Cory L wrote: > I have a query that is inner joined with another table based on > country codes Select distinct Name.* from Name inner join Location on > Location.key = Name.key and Location.cc in ('<list of countries > here>');
>From the message you're getting it seems you're using a heap table. Why is that? In the documentation it says that for heap tables "Indexes will only be used with = and <=> (but are VERY fast)." The indexes for heap tables are hash-based, which means they can't be used for range queries (since the hash values for consecutive keys won't be consecutive). But if you're using IN in you're query (with more than one value in the list) then you need to get a range from the index. Since that's not possible with a heap table, the whole table must be scanned. -- Keith C. Ivey <[EMAIL PROTECTED]> Tobacco Documents Online http://tobaccodocuments.org -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]