From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | depesz(at)depesz(dot)com |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: [9.2devel] why it doesn't do index scan only? |
Date: | 2011-10-08 17:04:11 |
Message-ID: | 11810.1318093451@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I wrote:
> hubert depesz lubaczewski <depesz(at)depesz(dot)com> writes:
>> it is selecting 20 rows out of 30 million. why is it:
>> 1. not using index only scan
>> 2. not using even normal index scan?
> It thinks the bitmap scan is cheaper.
No, wait, I take that back --- it can't do a plain indexscan because
ScalarArrayOp (=ANY(ARRAY)) isn't supported as a plain indexscan qual,
only as a bitmap qual. This is because we rely on the bitmap to
eliminate duplicates. It was never worth improving on that before;
but now that plain indexscans have a potential performance advantage,
we ought to think about ways to use ScalarArrayOp in plain indexscans.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | pasman pasmański | 2011-10-08 17:20:48 | Re: [9.2devel] why it doesn't do index scan only? |
Previous Message | Tom Lane | 2011-10-08 16:47:46 | Re: [9.2devel] why it doesn't do index scan only? |