• events_statements_histogram_global  has a BUCKET_NUMBER  column. This table summarizes latencies globally across schema name and digest values, using a single histogram. The BUCKET_NUMBER  column indicates the bucket number within this global histogram. 

A histogram consists of N  buckets, where each row represents one bucket, with the bucket number indicated by the BUCKET_NUMBER  column. Bucket numbers begin with 0. 

Each statement histogram summary table has these summary columns containing aggregated values: 

• BUCKET_TIMER_LOW , BUCKET_TIMER_HIGH 

A bucket counts statements that have a latency, in picoseconds, measured between BUCKET_TIMER_LOW  and BUCKET_TIMER_HIGH : 

•The value of BUCKET_TIMER_LOW  for the first bucket ( BUCKET_NUMBER  = 0) is 0. 

•The value of BUCKET_TIMER_LOW  for a bucket ( BUCKET_NUMBER  = k ) is the same as BUCKET_TIMER_HIGH  for the previous bucket ( BUCKET_NUMBER  = k − 1) 

•The last bucket is a catchall for statements that have a latency exceeding previous buckets in the histogram. 

• COUNT_BUCKET 

The number of statements measured with a latency in the interval from BUCKET_TIMER_LOW  up to but not including BUCKET_TIMER_HIGH . 

• COUNT_BUCKET_AND_LOWER 

The number of statements measured with a latency in the interval from 0 up to but not including BUCKET_TIMER_HIGH . 

• BUCKET_QUANTILE 

The proportion of statements that fall into this or a lower bucket. This proportion corresponds by definition to COUNT_BUCKET_AND_LOWER / SUM(COUNT_BUCKET)  and is displayed as a convenience column. 

The statement histogram summary tables have these indexes: 

• events_statements_histogram_by_digest : 

•Unique index on ( SCHEMA_NAME , DIGEST , BUCKET_NUMBER ) 

• events_statements_histogram_global : 

•Primary key on ( BUCKET_NUMBER ) 

TRUNCATE TABLE  is permitted for statement histogram summary tables. Truncation sets the COUNT_BUCKET  and COUNT_BUCKET_AND_LOWER  columns to 0. 

In addition, truncating events_statements_summary_by_digest  implicitly truncates events_statements_histogram_by_digest , and truncating events_statements_summary_global_by_event_name  implicitly truncates events_statements_histogram_global . 

## 27.12.20.5 Transaction Summary Tables 

