Commit b8f0b6f3 authored by unknown's avatar unknown

Added index cardinality check

parent 36d3f48c
......@@ -6,7 +6,13 @@ attr1 INT NOT NULL,
attr2 INT,
attr3 VARCHAR(10)
) ENGINE=ndbcluster;
SHOW INDEX FROM t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 0 PRIMARY 1 pk1 A 0 NULL NULL BTREE
INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413');
SHOW INDEX FROM t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 0 PRIMARY 1 pk1 A 2 NULL NULL BTREE
SELECT pk1 FROM t1 ORDER BY pk1;
pk1
9410
......
......@@ -20,8 +20,9 @@ CREATE TABLE t1 (
attr3 VARCHAR(10)
) ENGINE=ndbcluster;
SHOW INDEX FROM t1;
INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413');
SHOW INDEX FROM t1;
SELECT pk1 FROM t1 ORDER BY pk1;
SELECT * FROM t1 ORDER BY pk1;
SELECT t1.* FROM t1 ORDER BY pk1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment