they are fast to compute and have a favorable statistical distribution that minimizes collisions. See Section 27.12.20.3, “Statement Summary Tables” . 

Some Performance Tables have a column that stores original SQL statements from which digests are computed: 

•The SQL_TEXT  column of the events_statements_current , events_statements_history , and events_statements_history_long  statement event tables. 

•The QUERY_SAMPLE_TEXT  column of the events_statements_summary_by_digest  summary table. 

The maximum space available for statement display is 1024 bytes by default. To change this value, set the performance_schema_max_sql_text_length  system variable at server startup. Changes affect the storage required for all the columns just named. 

The performance_schema_max_digest_length  system variable determines the maximum number of bytes available per statement for digest value storage in the Performance Schema. However, the display length of statement digests may be longer than the available buffer size due to internal encoding of statement elements such as keywords and literal values. Consequently, values selected from the DIGEST_TEXT  column of statement event tables may appear to exceed the performance_schema_max_digest_length  value. 

The events_statements_summary_by_digest  summary table provides a profile of the statements executed by the server. It shows what kinds of statements an application is executing and how often. An application developer can use this information together with other information in the table to assess the application’s performance characteristics. For example, table columns that show wait times, lock times, or index use may highlight types of queries that are inefficient. This gives the developer insight into which parts of the application need attention. 

The events_statements_summary_by_digest  summary table has a fixed size. By default the Performance Schema estimates the size to use at startup. To specify the table size explicitly, set the performance_schema_digests_size  system variable at server startup. If the table becomes full, the Performance Schema groups statements that have SCHEMA_NAME  and DIGEST  values not matching existing values in the table in a special row with SCHEMA_NAME  and DIGEST  set to NULL . This permits all statements to be counted. However, if the special row accounts for a significant percentage of the statements executed, it might be desirable to increase the summary table size by increasing performance_schema_digests_size . 

## Statement Digest Memory Use 

For applications that generate very long statements that differ only at the end, increasing max_digest_length  enables computation of digests that distinguish statements that would otherwise aggregate to the same digest. Conversely, decreasing max_digest_length  causes the server to devote less memory to digest storage but increases the likelihood of longer statements aggregating to the same digest. Administrators should keep in mind that larger values result in correspondingly increased memory requirements, particularly for workloads that involve large numbers of simultaneous sessions (the server allocates max_digest_length  bytes per session). 

As described previously, normalized statement digests as computed by the parser are constrained to a maximum of max_digest_length  bytes, whereas normalized statement digests stored in the Performance Schema use performance_schema_max_digest_length  bytes. The following memory-use considerations apply regarding the relative values of max_digest_length  and performance_schema_max_digest_length : 

•If max_digest_length  is less than performance_schema_max_digest_length : 

