You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Andrey Khitrin (Jira)" <ji...@apache.org> on 2024/03/15 14:40:00 UTC
[jira] [Resolved] (IGNITE-19461) The composite index is used when single column index expected to be used
[ https://issues.apache.org/jira/browse/IGNITE-19461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrey Khitrin resolved IGNITE-19461.
-------------------------------------
Release Note: Cannot reproduce on fresh AI3.
Resolution: Cannot Reproduce
> The composite index is 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
> Priority: Minor
> Labels: ignite-3
>
> 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. Insert some rows.
> 5. 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)