Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- my query is a bit slow....
December 2, 2006, 1:44 am
rate this thread
I have the following query:
LEFT JOIN EXTRA_DETAILS ON
ITEM.item_code = EXTRA_DETAILS.object_code
WHERE EXTRA_DETAILS.field_value IS NULL;
ITEM has about 10,000 records in it and EXTRA_DETAILS has about 30,000
items in it. There are about 2,000 matches.
What I am trying to achieve is to delete all the records from ITEM that
do not have a match in EXTRA_DETAILS
For some reason the query takes like about 60 seconds to process.
I have added an index to EXTRA_DETAILS.object_code (int(12) and
ITEM.item_code is the primary index of ITEM (also int(12).
Any recommendations greatly appreciated.
Thanks a million
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum