From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jeffrey Baker <jwbaker(at)acm(dot)org> |
Cc: | Neil Conway <neilc(at)samurai(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: bitmap scans, btree scans, and tid order |
Date: | 2005-05-16 13:53:30 |
Message-ID: | 17173.1116251610@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jeffrey Baker <jwbaker(at)acm(dot)org> writes:
> Change the planner/executor to use the bitmap scan in all cases where
> index order is unimportant. From my reading of the current code, the
> bitmap scan is only used in case of a join.
This is a fallacy, and I think your concern is largely mistaken. Have
you experimented with the cases you are worried about?
It's entirely possible that the current cost model needs adjustment to
make the planner pick the bitmap scan in more cases. However, it is
easy to demonstrate (either by thought-experiment or actual trial) that
a bitmap scan isn't necessarily a win. The overhead of maintaining the
bitmap is far from zero, and you don't get anything unless the resulting
pattern of heap page fetches is significantly cleaner than before.
Therefore, a patch that eliminates cost-estimation in favor of trying to
force one choice or the other is definitely not likely to be received
favorably ...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-05-16 14:01:13 | Re: Cost of XLogInsert CRC calculations |
Previous Message | Teodor Sigaev | 2005-05-16 13:14:57 | Re: Best way to scan on-disk bitmaps |