help with making appropriate indexes.
| From: | lallous | Date: | Wed, 14 Aug 2002 12:15:11 +0000 |
| Subject: | help with making appropriate indexes. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-112513@lists.php.net to get a copy of this message | ||
give this query:
SELECT
table_routing.id AS routeid,
table_pricing.units AS price,
table_routing.provider AS providerid,
table_country.name AS countryname,
table_country.id AS countrycode
FROM
table_pricing,
table_routing,
table_country
WHERE
table_country.id = table_routing.country
AND
table_routing.country = table_pricing.country
AND
table_routing.provider = table_pricing.provider
AND
table_country.enabled = 1
ORDER BY routeid
what keys / indexes should I create on whatever tables to make this query
efficient?
I don't know if this query can be re-written even with JOINs and stuff.
Please advise,
If you've got an online doc. about that it will help too.
Elias