summaryrefslogtreecommitdiff
path: root/mysql-test/r/statistics.result
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-05-22 20:55:07 -0700
committerIgor Babaev <igor@askmonty.org>2012-05-22 20:55:07 -0700
commit055477ae522b805d3b2e890af9fe520cc1e3290d (patch)
tree6f45830161e7fa5f2a690046fc6f118f9331b3b2 /mysql-test/r/statistics.result
parent2a1afc29f252fb189f6e93a2e0d3a1939f8220d5 (diff)
downloadmariadb-git-055477ae522b805d3b2e890af9fe520cc1e3290d.tar.gz
Support of the extended syntax for ANALYZE.
Diffstat (limited to 'mysql-test/r/statistics.result')
-rw-r--r--mysql-test/r/statistics.result59
1 files changed, 59 insertions, 0 deletions
diff --git a/mysql-test/r/statistics.result b/mysql-test/r/statistics.result
index 3a83f9ba66c..e4d6954c745 100644
--- a/mysql-test/r/statistics.result
+++ b/mysql-test/r/statistics.result
@@ -219,6 +219,65 @@ WHERE t1.e IS NOT NULL AND t1.b IS NOT NULL AND t1.d IS NOT NULL)
AS 'ARITY 3';
ARITY 1 ARITY 2 ARITY 3
6.2000 1.6875 1.1304
+DELETE FROM mysql.table_stat;
+DELETE FROM mysql.column_stat;
+DELETE FROM mysql.index_stat;
+ANALYZE TABLE t1 PERSISTENT FOR COLUMNS() INDEXES();
+Table Op Msg_type Msg_text
+test.t1 analyze status Table is already up to date
+SELECT * FROM table_stat;
+db_name table_name cardinality
+test t1 40
+SELECT * FROM column_stat;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
+SELECT * FROM index_stat;
+db_name table_name index_name prefix_arity avg_frequency
+ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(c,e,b) INDEXES(idx2,idx4);
+Table Op Msg_type Msg_text
+test.t1 analyze status Table is already up to date
+SELECT * FROM table_stat;
+db_name table_name cardinality
+test t1 40
+SELECT * FROM column_stat;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
+test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000
+test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
+test t1 e 0.01 0.112 0.2250 8.0000 6.2000
+SELECT * FROM index_stat;
+db_name table_name index_name prefix_arity avg_frequency
+test t1 idx2 1 7.0000
+test t1 idx2 2 2.3846
+test t1 idx4 1 6.2000
+test t1 idx4 2 1.6875
+test t1 idx4 3 1.1304
+DELETE FROM mysql.table_stat;
+DELETE FROM mysql.column_stat;
+DELETE FROM mysql.index_stat;
+ANALYZE TABLE t1 PERSISTENT FOR COLUMNS ALL INDEXES ALL;
+Table Op Msg_type Msg_text
+test.t1 analyze status Table is already up to date
+SELECT * FROM table_stat;
+db_name table_name cardinality
+test t1 40
+SELECT * FROM column_stat;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
+test t1 a 0 49 0.0000 4.0000 1.0000
+test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000
+test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
+test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
+test t1 e 0.01 0.112 0.2250 8.0000 6.2000
+test t1 f 1 5 0.2000 1.0000 6.4000
+SELECT * FROM index_stat;
+db_name table_name index_name prefix_arity avg_frequency
+test t1 PRIMARY 1 1.0000
+test t1 idx1 1 6.4000
+test t1 idx1 2 1.6875
+test t1 idx2 1 7.0000
+test t1 idx2 2 2.3846
+test t1 idx3 1 8.5000
+test t1 idx4 1 6.2000
+test t1 idx4 2 1.6875
+test t1 idx4 3 1.1304
CREATE TABLE t2 LIKE t1;
ALTER TABLE t2 ENGINE=InnoDB;
INSERT INTO t2 SELECT * FROM t1;