Contents
- 1 What are the rules for a slow query in MySQL?
- 2 What are the supported values for Amazon RDS for MySQL?
- 3 Are there any performance issues with MySQL database?
- 4 What is the purpose of the slow query log?
- 5 How long does it take to update a table in MySQL?
- 6 How to log queries that do not use indexes?
- 7 Why does MySQL not log slow admin statements?
What are the rules for a slow query in MySQL?
The query must have examined at least min_examined_row_limit rows. The query must not be suppressed according to the log_throttle_queries_not_using_indexes setting. The server does not log queries handled by the query cache. By default, a replica does not write replicated queries to the slow query log.
What are the supported values for Amazon RDS for MySQL?
The following are the supported values for Amazon RDS for MySQL DB instances: 0 (“names stored as given and comparisons are case-sensitive”) is supported for all Amazon RDS for MySQL versions.
Is there a size limit for MySQL redo log?
For MySQL, there is a size limit on BLOBs written to the redo log. To account for this limit, ensure that the innodb_log_file_size parameter for your MySQL DB instance is 10 times larger than the largest BLOB data size found in your tables, plus the length of other variable length fields ( VARCHAR, VARBINARY, TEXT) in the same tables.
Are there any performance issues with MySQL database?
Performance issues are common problems when administering MySQL databases. Sometimes these problems are, in fact, due to slow queries. In this blog, we’ll deal with slow queries and how to identify these. MySQL has the capability to filter and log slow queries.
The query must have taken at least long_query_time seconds, or log_queries_not_using_indexes must be enabled and the query used no indexes for row lookups. The query must have examined at least min_examined_row_limit rows. The query must not be suppressed according to the log_throttle_queries_not_using_indexes setting.
What is the purpose of the slow query log?
5.4.5 The Slow Query Log. The slow query log consists of SQL statements that take more than long_query_time seconds to execute and require at least min_examined_row_limit rows to be examined. The slow query log can be used to find queries that take a long time to execute and are therefore candidates for optimization.
How to manage a growing MySQL general log table?
For those who used MySQL RDS and enable the slow log, Amazon will use CSV only. The RDS environment can auto-rotate at a specific time every night. If you using MySQL RDS and wish to use slow logs, let RDS do its thing. Jan 08, 2012 : How to enable MySQL general log?
How long does it take to update a table in MySQL?
The table contains ~5 Million rows. This query updates ~80k rows and takes around 60 seconds to complete, and the more rows updated the longer it takes which results in timeouts. The index IX_ParentKey cardinality is ~830k. Note that a select with the same WHERE clause returns very quickly (< 1s).
How to log queries that do not use indexes?
To include queries that do not use indexes for row lookups in the statements written to the slow query log, enable the log_queries_not_using_indexes system variable. (Even with that variable enabled, the server does not log queries that would not benefit from the presence of an index due to the table having fewer than two rows.)
Is there a rate limit for MySQL not using indexes?
It is possible to put a rate limit on these queries by setting the log_throttle_queries_not_using_indexes system variable. By default, this variable is 0, which means there is no limit. Positive values impose a per-minute limit on logging of queries that do not use indexes.
Why does MySQL not log slow admin statements?
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.