마리아디비 슬로우쿼리를 3초나 5초등으로 적용 했는데도 슬로우쿼리에 모든 쿼리가 전부 쌓이는 증상이 있었다.


제너럴 로그였나 모든 쿼리 쌓는게 슬로우쿼리로 이름이 잘못돼있는건가... 이것저것 찾아보던중


##공식홈페이지 참고##

https://mariadb.com/kb/en/library/server-system-variables/#log_queries_not_using_indexes

log_queries_not_using_indexes

  • Description: Queries that don't use an index, or that perform a full index scan where the index doesn't limit the number of rows, will be logged to the slow query log (regardless of time taken). The slow query log needs to be enabled for this to have an effect.
  • Commandline: --log-queries-not-using-indexes
  • Scope: Global
  • Dynamic: Yes
  • Data Type: boolean
  • Default Value: OFF




위와같은 내용이 있다. 어쩌구 저쩌구 용량 관계없이 쓰여진다 뭐 이런 내용인듯. 기본값은 OFF라는데 왜 이서버들은 ON이냐



MariaDB [(none)]> SHOW VARIABLES LIKE '%log_queries_not_%';    

+-------------------------------+-------+

| Variable_name                 | Value |

+-------------------------------+-------+

| log_queries_not_using_indexes | ON    |

+-------------------------------+-------+

1 row in set (0.00 sec)


확인해보니 켜져있다.


MariaDB [(none)]> set global log_queries_not_using_indexes  = OFF;

Query OK, 0 rows affected (0.00 sec)


MariaDB [(none)]> SHOW VARIABLES LIKE '%log_queries_not_%';       

+-------------------------------+-------+

| Variable_name                 | Value |

+-------------------------------+-------+

| log_queries_not_using_indexes | OFF   |

+-------------------------------+-------+

1 row in set (0.00 sec)


껏다.


해결됐다. ㅋㄷㅋㄷ

'job > mysql' 카테고리의 다른 글

mysql dead lock 확인하기  (0) 2019.01.24
mysql innodb buffer pool size  (0) 2019.01.24
mysql old패스워드 password 함수 동시 사용  (0) 2018.09.03
mysql update replace  (0) 2018.09.03
mysql history 로그 설정  (0) 2018.09.03

+ Recent posts