Hi,

What does it mean *sometimes* optimizer chooses wrong index? Does it mean
that you can run this query with correct plan at the first time and another
time it will run with wrong plan?

Can you share a reproducible test case then?

Sergi

2017-01-05 17:47 GMT+03:00 lawrencefinn <[email protected]>:

> It's pretty significant, and it get's more significant with joins.  Below
> is
> attached some data from a simple example.  When the index is used for
> sorting, it is SUPER fast.  Just hoping to take advantage of that :(
> *****Wrong index ****
> [SELECT
>     LI._VAL AS __C0,
>     MEMBER_ID AS __C1,
>     NAME AS __C2
> FROM "lineitem".LINEITEM LI
>     /* "lineitem"."member_lifetime_budget": MEMBER_ID = 12 */
> WHERE MEMBER_ID = 12
> ORDER BY 2, 3
> LIMIT 25]
>
> *Time 162*
>
> ***** Correct index ****
> [SELECT
>     LI._VAL AS __C0,
>     MEMBER_ID AS __C1,
>     NAME AS __C2
> FROM "lineitem".LINEITEM LI
>     /* "lineitem"."member_name": MEMBER_ID = 12 */
> WHERE MEMBER_ID = 12
> ORDER BY 2, 3
> LIMIT 25
> /* index sorted */]
> Time 7
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/grouped-index-sort-vs-filter-tp9885p9901.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Reply via email to