From: | David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> |
---|---|
To: | Edmund Horner <ejrh00(at)gmail(dot)com> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Tid scan improvements |
Date: | 2018-09-17 11:21:49 |
Message-ID: | CAKJS1f8FyS51b6j++qShP_av5Kq1oq83t16ALPftPm4F0BbqkQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 15 August 2018 at 11:11, Edmund Horner <ejrh00(at)gmail(dot)com> wrote:
> So we'd extend that to:
> - Include in the OR-list "range" subquals of the form (ctid > ? AND
> ctid < ?) (either side could be optional, and we have to deal with >=
> and <= and having ctid on the rhs, etc.).
> - Cost the range subquals by assuming they don't overlap, and
> estimating how many blocks and tuples they span.
> - When beginning the scan, evaluate all the ?s and build an array of
> "tid ranges" to fetch. A tid range is a struct with a starting tid,
> and an ending tid, and might just be a single tid item.
> - Sort and remove duplicates.
> - Iterate over the array, using a single fetch for single-item tid
> ranges, and starting/ending a heap scan for multi-item tid ranges.
>
> I think I'll try implementing this.
>
I've set this patch as waiting on author in the commitfest app.
--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2018-09-17 11:41:13 | Re: pgsql: Allow concurrent-safe open() and fopen() in frontend code for Wi |
Previous Message | Rajkumar Raghuwanshi | 2018-09-17 11:20:49 | Multiple primary key on partition table? |