Below is the excerpt from MySQL manuals on slow query log :
“By default, administrative statements are not logged, nor are queries that do not use indexes for lookups. This behavior can be changed using log_slow_admin_statements and log_queries_not_using_indexes, as described later. “
This manual entry is kind of misleading . It means that queries not using indexes are not logged by default. Let us see what the reality is :
1) Let us see if queries not using indexes are being logged.
Below table does not have index:
mysql> describe employee ; +-------+---------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+---------+------+-----+---------+-------+ | ID | int(11) | YES | | NULL | | +-------+---------+------+-----+---------+-------+ 1 row in set (0.00 sec) mysql> show indexes from employee ; Empty set (0.00 sec) …[Read more]