You can filter the queries shown within the Query Analyzer table by using the form at the top of the table. The different fields of the form are used to specify the parameters for the filter process. Once you have specified a filter, all the queries and related statistics shown within the Query Analyzer table are displayed in relation to the filter settings. For example, by default, the filter settings show the queries for the last 30 minutes. All the statistics shown are relative to the last 30 minutes, including average, maximum and execution counts.
The filter fields are:
Search Type and Query Search support text searching of the normalized query. For the search type you can specify either a basic text match, or a regular expression match. In addition to the basic text match, you can also search for a query that does not contain a particular string. For regular expression searches, you can specify whether the regular expression should match, or not match (negative regexp) the queries. Regular expressions are parsed using the standard MySQL
REGEXP()function. For more information, see Section 11.4.2, “Regular Expressions”.
The search is performed against the canonical version of the query. You cannot search against specific text or values within the parameters of the query itself.
Database: Limit the queries to those executed within a specific database. The database match is performed using the
LIKEmatch from the MySQL database, hence you can use the
_characters to multiple and single character matches. For more information, see Section 18.104.22.168, “Pattern Matching”.
The Time Display menu selects whether the time selection for filtering should be based on the time interval (only queries recorded within the displayed time period are shown, using the Hours and Minutes popup), or whether the selection should be based on a time period (From/To), where you can select the time range to be displayed.
Using the Interval mode shows queries within the given time period from the point the graph was updated. For example, if you select 30 minutes, then the queries shown were captured within the last 30 minutes. If you updated the display at 14:00, then the queries displayed would have been captured between 13:30 and 14:00. Using interval mode limits the timespan for the filter selection to a maximum of 23 hours and 59 minutes.
Using the From/To mode enables you to show queries between specific dates and times. Using this mode you can show only the queries received during a specific time span, and you can display the query history for a much longer time period, for as long as you have been recording query analysis information.
The View selection determines whether the information should be returned on a group basis, where an aggregate of the same query executed on all monitored servers is shown, or on a Server basis, where queries are summarized by individual server. If the latter option has been selected, the table includes an additional column showing the server.
Query Type lets you select the type of query on which to filter queries. Selecting All will show all queries. Additional query types you can select include
UPDATEand other main SQL query types.
Limit specifies the number of queries to be displayed within each page.
When you have set your filter parameters, you can update the Query Analysis display by clicking thebutton. To reset the fields to the default settings click the button.