![]() ![]() When you precede a SELECT statement with the keyword EXPLAIN, MySQL displays information from the optimizer about the query execution plan. ![]() The EXPLAIN statement can be used either as a synonym for DESCRIBE or as a way to obtain information about how MySQL executes a SELECT statement:ĮXPLAIN tbl_name is synonymous with DESCRIBE tbl_name or SHOW COLUMNS FROM tbl_name. ![]() The return value is always zero, but mysql prints a line displaying approximately how long the statement took to execute. Its syntax is BENCHMARK( loop_count,expression ). If your problem is with a specific MySQL expression or function, you can perform a timing test by invoking the BENCHMARK() function using the mysql client program. If you have a very high statement-processing load, it may be worth the time to use a simplified grant structure to reduce permission-checking overhead. Similarly, if you place no resource limits on any accounts, the server does not have to perform resource counting. For example, if you do not grant any table-level or column-level privileges, the server need not ever check the contents of the tables_priv and columns_priv tables. Using simpler permissions when you issue GRANT statements enables MySQL to reduce permission-checking overhead when clients execute statements. Optimizing SELECT and Other Statementsįirst, one factor affects all statements: The more complex your permissions setup, the more overhead you have. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |