Igor created IGNITE-19461:
-----------------------------
Summary: The composite index used when single column index
expected to be used
Key: IGNITE-19461
URL: https://issues.apache.org/jira/browse/IGNITE-19461
Project: Ignite
Issue Type: Bug
Components: jdbc, sql, thin client
Reporter: Igor
h1. Steps to reproduce:
1. Create table.
{code:java}
CREATE TABLE index_test_table_5(id INT PRIMARY KEY, field_1 TINYINT, field_2
SMALLINT, field_3 INT, field_4 FLOAT, field_5 VARCHAR){code}
2. Create index:
{code:java}
CREATE INDEX index_test_index_5_1 ON index_test_table_5(field_2){code}
3. Create composite index:
{code:java}
CREATE INDEX index_test_index_5_2 ON index_test_table_5(field_2, field_3,
field_5){code}
4. Explain plan for query with filter by column contained in both indexes:
{code:java}
EXPLAIN PLAN FOR SELECT * FROM index_test_table_5 WHERE field_2 = 50{code}
h1. Expected result:
The index for single column is used (index_test_index_5_1)
h1. Actual result:
Randonly can be used either single column index (index_test_index_5_1) or
composite index (index_test_index_5_2).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)