# Switching from Static to Dynamic Mode - Cont'd

```
tidb> ANALYZE TABLE User;
Query OK, 0 rows affected, 6 warnings (0.55 sec)

tidb> SHOW STATS_META WHERE table_name LIKE 'User';
+---------+------------+----------------+---------------------+--------------+-----------+
| Db_name | Table_name | Partition_name | Update_time         | Modify_count | Row_count |
+---------+------------+----------------+---------------------+--------------+-----------+
|  test   |    User    |     global     | 2023-10-03 16:10:44 |      0       |     0     |
|  test   |    User    |       p0       | 2023-10-03 16:10:44 |      0       |     0     |
|  test   |    User    |       p1       | 2023-10-03 16:10:44 |      0       |     0     |
|  test   |    User    |       p2       | 2023-10-03 16:10:44 |      0       |     0     |
+---------+------------+----------------+---------------------+--------------+-----------+
4 rows in set (0.00 sec)

tidb> EXPLAIN SELECT * FROM User WHERE city IN ('Seattle', 'Tokyo') AND login BETWEEN '2023-09-01' AND '2024-11-30';
+--------------------+----------+-----------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------+
| id                 | estRows  | task      | access object   | operator info                                                                                                                            |
+--------------------+----------+-----------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------+
| TableReader_7      | 0.50     | root      | partition:p1,p2 | data:Selection_6                                                                                                                         |
| └─Selection_6      | 0.50     | cop[tikv] |                 | ge(test.user.login, 2023-09-01 00:00:00.000000), in(test.user.city, "Seattle", "Tokyo"), le(test.user.login, 2024-11-30 00:00:00.000000) |
|  └─TableFullScan_5 | 10000.00 | cop[tikv] | table:User      | keep order:false, stats:pseudo                                                                                                           |
+--------------------+----------+-----------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------+
3 rows in set (0.01 sec)
```

------------------------------------------------------------------------------
To ensure that the statistics used by SQL statements are accurate after enabling global `dynamic` pruning mode, it is necessary to manually trigger an `ANALYZE` operation on the tables or on a specific partition of the tables to obtain `GlobalStats`.

```
ANALYZE TABLE User;
```
or
```
ANALYZE TABLE User PARTITION p1;
```
