I have a simple cache where I have Person object (id, age and so on..)

I have created indeces by id and age to try some examples but queries with
"group by" go really slow.

I'm trying this query:
SELECT age
FROM
PersonWithindex
group by age


SELECT
    AGE AS __C0
FROM "personCacheWithIndex".PERSONWITHINDEX
    /* "personCacheWithIndex"."age_idx" */
GROUP BY AGE
/* group sorted */

SELECT
    __C0 AS AGE
FROM PUBLIC.__T0
    /* "personCacheWithIndex"."merge_scan" */
GROUP BY __C0

Although it seems that it uses index, why is it going so slow? I think that
it should be pretty fast with an index.

Reply via email to