We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please answer these questions before submitting your issue. Thanks!
mysql> create table t(c int); Query OK, 0 rows affected (0.01 sec) mysql> insert into t values(1),(2),(3),(4),(5); Query OK, 5 rows affected (0.01 sec) Records: 5 Duplicates: 0 Warnings: 0 mysql> analyze table t; Query OK, 0 rows affected (0.01 sec) mysql> show stats_histograms where table_name = 't'; Empty set (0.00 sec) -- reboot TiDB server and use a new connection mysql> show stats_histograms where table_name = 't'; Empty set (0.00 sec) -- use this query to mark column histogram as needed mysql> explain select * from t where c = 1; +---------------------+-------+------+----------------------------------------------+ | id | count | task | operator info | +---------------------+-------+------+----------------------------------------------+ | TableReader_7 | 0.01 | root | data:Selection_6 | | └─Selection_6 | 0.01 | cop | eq(test.t.c, 1) | | └─TableScan_5 | 10.00 | cop | table:t, range:[-inf,+inf], keep order:false | +---------------------+-------+------+----------------------------------------------+ 3 rows in set (0.00 sec) mysql> show stats_histograms where table_name = 't'; +---------+------------+----------------+-------------+----------+---------------------+----------------+------------+--------------+-------------+ | Db_name | Table_name | Partition_name | Column_name | Is_index | Update_time | Distinct_count | Null_count | Avg_col_size | Correlation | +---------+------------+----------------+-------------+----------+---------------------+----------------+------------+--------------+-------------+ | test | t | | c | 0 | 2019-03-13 18:14:55 | 5 | 0 | 8 | 0 | +---------+------------+----------------+-------------+----------+---------------------+----------------+------------+--------------+-------------+ 1 row in set (0.00 sec)
Correlation field should be 1.
Correlation
Correlation field is 0.
tidb-server -V
select tidb_version();
Release Version: v3.0.0-beta-211-g09beefbe0 Git Commit Hash: 09beefbe045011e3c77608c9ed33da87c11efa94 Git Branch: master UTC Build Time: 2019-03-13 10:13:24 GoVersion: go version go1.12 darwin/amd64 Race Enabled: false TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e Check Table Before Drop: false
The text was updated successfully, but these errors were encountered:
eurekaka
No branches or pull requests
Bug Report
Please answer these questions before submitting your issue. Thanks!
Correlation
field should be 1.Correlation
field is 0.tidb-server -V
or runselect tidb_version();
on TiDB)?The text was updated successfully, but these errors were encountered: