I’ve create this index:
CREATE INDEX channel_idx ON megatron
(channel)
I have 100000 documents in the bucket
And i’m doing those queries:
1)
SELECT duration FROM megatron
WHERE channel=1
~991ms
SELECT duration FROM megatron
WHERE channel=1 OR channel=2
~1987ms
SELECT duration FROM megatron
WHERE channel IN [1, 2]
~13028ms
Why the use of IN is such slow ?
are there any other option to optimize such query ? when I need multiple not ranged key ?