# Manual Gathering

```
tidb> ANALYZE TABLE T2;
Query OK, 0 rows affected, 1 warning (0.41 sec)

tidb> SHOW ANALYZE STATUS WHERE table_name LIKE 'T2';
+--------------+------------+----------------+--------------------------------------------------------------------+
| Table_schema | Table_name | Partition_name | Job_info                                                           |
+--------------+------------+----------------+--------------------------------------------------------------------+
|     test     |     T2     |                | analyze table all columns with 256 buckets, 500 topn, 1 samplerate |
+--------------+------------+----------------+--------------------------------------------------------------------+
... wrapped
+----------------+---------------------+---------------------+----------+-------------+-----------------+------------+
| Processed_rows | Start_time          | End_time            | State    | Fail_reason | Instance        | Process_ID |
+----------------+---------------------+---------------------+----------+-------------+-----------------+------------+
|     20000      | 2023-05-11 02:20:40 | 2023-05-11 02:20:41 | finished |     NULL    | 10.90.1.25:4000 |    NULL    |
+----------------+---------------------+---------------------+----------+-------------+-----------------+------------+
1 rows in set (0.00 sec)
```

------------------------------------------------------------------------------
In the code example above, the command used for manually collecting statistical information is `ANALYZE TABLE T2;`. To monitor the status of the statistical information collection for table T2, the command `SHOW ANALYZE STATUS WHERE table_name LIKE 'T2';` can be employed. This command provides details on progress and other critical information, including:

- In `Job_info` column, it shows `analyze table all columns with 256 buckets, 500 topn, 1 samplerate`, indicates that the precision of this collection involves histograms for all columns and indexes with 256 buckets, the top 500 values, and a sampling rate of 1. Further details on sampling and precision will be discussed shortly. The `Processed_rows` column reflects the total number of rows scanned to date.

- `Start_time` and `End_time` columns specify the duration of the statistical information collection process.

- The `State` column signifies whether the collection is complete, with `finished` denoting completion and `running` indicating that the collection is ongoing.

- In case of a failure, the `Fail_reason` column elucidates the cause of the failure.

Having explored both automatic and manual statistical information collection methods, we will now examine the issue of sampling precision during the collection process.