Re: Getting list of Query which are all not using Index
Posted by: Peter Brawley
Date: April 13, 2016 12:29PM

Check out the manual on slow_query_log and long_query_time settings in my.cnf/ini. Default for the latter is 10 secs I think. You may need to cut it to 5 secs or 2 secs to catch your slow queries of interest.

Then for a query <qry_text> reported in slow_query_log, run this query ...

explain extended <qry_text>;

Query clauses for which Explain reports NULL key used are doing table scans.

The Explain manual page is clear on how to interpret Explain results. Read the optimisation manual chapter on how to design covering indexes for your slow queries.

Edited 1 time(s). Last edit at 04/13/2016 12:29PM by Peter Brawley.

Options: ReplyQuote

Written By
Re: Getting list of Query which are all not using Index
April 13, 2016 12:29PM

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.