On Wed, Aug 21, 2019 at 6:24 AM Alex wrote:
> suppose the executor should scan 1 first, If all the tuples for 1 has been
> scanned, then **it should be reset to 10** and scan again.
You might find my nbtree index scan test patch useful:
https://postgr.es/m/cah2-wzmrt_0ybhf05axqb2oituqiq
Hi,
At Wed, 21 Aug 2019 20:58:47 +0800, Alex wrote in
> postgres=# select * from t2 where a in (1, 10);
...
> I can see the plan stores the "1 and 10" information in
> IndexScan->indexqual, which is an SCALARARRAYOPEXPR expression.
...
> suppose the executor should scan 1 first, If al
given the following example:
postgres=# create table t2 as select generate_series(1, 10) as a,
generate_series(1, 10) as b;
SELECT 10
postgres=# create index t2_idx on t2(a);
CREATE INDEX
postgres=# set enable_seqscan = 0;
SET
postgres=# select * from t2 where a in (1, 10);
a