This is a discussion on SQL Guru's, I need HELP determining size of result set (forquery_cache purposes) within the MySQL Database forums, part of the Database Forums category; Hi, could any SQL gurus out there shed some light on how if I had a slow query from the ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi, could any SQL gurus out there shed some light on how if I had a
slow query from the slow query log, with all sorts of joins and complicated SQL wizardry, if I (as the SysAdmin) can determine the MySQL interpreted size (with respect to the query_cache_limit etc) of the result set it returns? I am thinking maybe using the SHOW TABLE STATUS with some kind of temporary table of the results might help, but I'm not sure how to syntactically express that. Thanks alot! George. |
|
|||
|
boole wrote:
> Hi, could any SQL gurus out there shed some light on how if I had a > slow query from the slow query log, with all sorts of joins and > complicated SQL wizardry, if I (as the SysAdmin) can determine the > MySQL interpreted size (with respect to the query_cache_limit etc) of > the result set it returns? > > I am thinking maybe using the SHOW TABLE STATUS with some kind of > temporary table of the results might help, but I'm not sure how to > syntactically express that. > > Thanks alot! > > George. The correct approach would be to fix whatever is causing the slow query to start with.. the query_cache will not pin it forever depending on how often that particular query is executed and how often the underlying data changes. Here is a tutorial FROM THE DOCS... (RtM???) http://dev.mysql.com/tech-resources/...ery-cache.html Query cache may help, but it is not the magic bullet in all cases. |