MySQL Forums
Forum List  »  Performance

Re: How can I improve this table and query
Posted by: Adam Copley
Date: February 17, 2016 08:25AM

Hi there, thanks for your reply.

Thanks for spotting the unused join. I ran your version of the query through workbench again. But strangely it took 18 seconds, then 15 seconds to run, despite a better looking explain.

'1', 'SIMPLE', 'nationalities', 'index', 'PRIMARY,natv', 'natv', '49', NULL, '229', 'Using where; Using index; Using temporary; Using filesort'
'1', 'SIMPLE', 'transaction_data', 'ref', 'txnid,cov,period,natperiod', 'natperiod', '10', '2_sar.nationalities.nationality_id,const', '1608', 'Using index condition; Using where'
'1', 'SIMPLE', 'products', 'ref', 'skubrand', 'skubrand', '5', '2_sar.transaction_data.sku', '1', 'Using where; Using index'
'1', 'SIMPLE', 'transaction_data', 'ref', 'txnid,cov', 'txnid', '99', '2_sar.transaction_data.txn_id', '1', 'Using where'
'1', 'SIMPLE', 'products', 'ref', 'skubrand', 'skubrand', '128', '2_sar.transaction_data.sku,const', '1', 'Using where; Using index; FirstMatch(products)'

Options: ReplyQuote


Subject
Views
Written By
Posted
2029
February 17, 2016 04:49AM
Re: How can I improve this table and query
1041
February 17, 2016 08:25AM


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.