提交 64281d5b authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

An additional adjustment

上级 b3a1e2d3
......@@ -210,6 +210,7 @@ public abstract class BaseIndex extends SchemaObjectBase implements Index {
if (tryAdditional) {
while (i < len && masks[columns[i].getColumnId()] != 0) {
i++;
rowsCost--;
}
}
// Increase cost of indexes with additional unused columns
......
......@@ -323,6 +323,9 @@ EXPLAIN SELECT * FROM TEST WHERE A = 0;
EXPLAIN SELECT * FROM TEST WHERE A = 0 AND B >= 0;
>> SELECT TEST.A, TEST.B, TEST.C FROM PUBLIC.TEST /* PUBLIC.T_A_B: A = 0 AND B >= 0 */ WHERE (A = 0) AND (B >= 0)
EXPLAIN SELECT * FROM TEST WHERE A > 0 AND B >= 0;
>> SELECT TEST.A, TEST.B, TEST.C FROM PUBLIC.TEST /* PUBLIC.T_A_B: A > 0 AND B >= 0 */ WHERE (A > 0) AND (B >= 0)
INSERT INTO TEST (SELECT X / 100, X, X FROM SYSTEM_RANGE(1, 3000));
> update count: 3000
......@@ -332,6 +335,9 @@ EXPLAIN SELECT * FROM TEST WHERE A = 0;
EXPLAIN SELECT * FROM TEST WHERE A = 0 AND B >= 0;
>> SELECT TEST.A, TEST.B, TEST.C FROM PUBLIC.TEST /* PUBLIC.T_A_B: A = 0 AND B >= 0 */ WHERE (A = 0) AND (B >= 0)
EXPLAIN SELECT * FROM TEST WHERE A > 0 AND B >= 0;
>> SELECT TEST.A, TEST.B, TEST.C FROM PUBLIC.TEST /* PUBLIC.T_A_B: A > 0 AND B >= 0 */ WHERE (A > 0) AND (B >= 0)
-- Test that creation order of indexes has no effect
CREATE INDEX T_A2 ON TEST(A);
> ok
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论