MySQL Forums
Forum List  »  MySQL Query Browser

Re: Help me to get fast query
Posted by: kordirko kordirko
Date: January 10, 2012 10:51AM

Hello,

There is no indexes on transaction_id + key columns that your query is using here:
  FROM `transaction_xtras` `tx`
  WHERE ((`tx`.`transaction_id` = `epstransaction`.`id`)
  AND (`tx`.`key` = 'no_kp_lama')))

So create a composite index on these two columns - run this command:

   CREATE INDEX trans_xtras_key_trid_ix 
   ON transaction_xtras( key, transaction_id );

Then run your query and check how long it will be running.

Options: ReplyQuote


Subject
Written By
Posted
January 08, 2012 12:59AM
January 08, 2012 12:21PM
January 08, 2012 12:28PM
January 08, 2012 08:25PM
January 09, 2012 08:30PM
Re: Help me to get fast query
January 10, 2012 10:51AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.