* Twibell, Cory L
> 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>');
>
> The problem is when I have more than 2 country codes, the query
> takes forever...
[...]
Please show the output of the following commands:
SHOW CREATE TABLE Name;
SHOW CREATE TABLE Location;
EXPLAIN Select distinct Name.*
from Name inner join Location on
Location.key = Name.key and
Location.cc in ('<list of countries here>');
You probably need to define some indexes:
<URL: http://www.mysql.com/doc/en/MySQL_indexes.html >
<URL: http://www.mysql.com/doc/en/CREATE_INDEX.html >
--
Roger
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]