# `SQL Statements` History Size Settings
![`smart`](TiDBMonitorSQLPerf0201_en_002_20240125.png)
![`smart`](TiDBMonitorSQLPerf0202_en_002_20240125.png)
------------------------------------------------------------------------------
When using the `SQL Statements` panel, it is important to configure the history size of SQL statements via `settings` to prevent excessive memory usage. First, you can specify the number of stored statements through the `Max # Statement` option. When the number of stored statements exceeds this configured limit, older statements will be discarded. Additionally, you can partition time into windows of a specified size, measured in minutes. The maximum history data displayable is the product of the window count and window size. For example, if the window size is set to 5 minutes and the window count is 4, the maximum duration for which `TiDB Dashboard` can store historical SQL statements is `4 x 5 = 20 minutes`, meaning any SQL statements older than 20 minutes will be discarded.

It is worth noting that if the `Max # Statement` is set too low, the `SQL Statements` panel may not retain SQL statements for the full duration of 20 minutes.