Re: kill_prior_tuple and index scan costing

2020-03-21 Thread Andres Freund
Hi, On 2020-03-21 23:53:05 -0500, Justin Pryzby wrote: > On Sat, Mar 21, 2020 at 07:33:02PM -0700, Andres Freund wrote: > > While your recent btree work ensures that we get the heap tids for an > > equality lookup in heap order (right?), > > I think when I tested the TID tiebreaker patch, it

Re: kill_prior_tuple and index scan costing

2020-03-21 Thread Justin Pryzby
On Sat, Mar 21, 2020 at 07:33:02PM -0700, Andres Freund wrote: > While your recent btree work ensures that we get the heap tids for an > equality lookup in heap order (right?), I think when I tested the TID tiebreaker patch, it didn't help for our case, which is for inequality: (timestamptz >=

Re: kill_prior_tuple and index scan costing

2020-03-21 Thread Andres Freund
Hi, reply largely based on a quick IM conversation between Peter and me. On 2020-03-04 17:13:33 -0800, Peter Geoghegan wrote: > Both plans are very similar, really. The number of heap accesses and > B-Tree index page accesses is exactly the same in each case. Note that bitmap heap scans,

kill_prior_tuple and index scan costing

2020-03-04 Thread Peter Geoghegan
If I run the regression tests so that the "tenk1" table is available, and then create an index on tenk1.twothousand, I notice that simple "where twothousand = ?" queries have query plans that look like the following sample plan: pg@regression:5432 [17755]=# explain (analyze, buffers, costs off)