Alex Rivera | Logout

Log QUERIES not using INDEX - MySQL

Asked 2011-06-21T16:10:10.867
17

I'm using MySQL Server version: 5.5.8-log MySQL Community Server (GPL)
I want to log queries which are not using INDEX and is slow too !
I'm copying here my my.ini settings.

[mysqld]
port=3306
log = "E:/wamp/logs/genquery.log"

log_slow_queries
long_query_time = 1
slow_query_log = 1
slow_query_log_file = "E:/wamp/logs/slowquery.log"

what change i need to do ?

Edit
Report

2 Answers

42

log_queries_not_using_indexes =1 //(or Yes) (From mysql)

answered 2011-06-21T16:14:52.137
6

log_queries_not_using_indexes

Command-Line Format --log-queries-not-using-indexes
Option-File Format  log-queries-not-using-indexes
Option Sets Variable    Yes, log_queries_not_using_indexes
Variable Name   log_queries_not_using_indexes
Variable Scope  Global
Dynamic Variable    Yes
    Permitted Values
Type    boolean

Whether queries that do not use indexes are logged to the slow query log. See Section 5.2.4,

answered 2011-06-21T16:18:04.700

Your Answer