Re: Tid scan improvements
От | David Rowley |
---|---|
Тема | Re: Tid scan improvements |
Дата | |
Msg-id | CAKJS1f8FyS51b6j++qShP_av5Kq1oq83t16ALPftPm4F0BbqkQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Tid scan improvements (Edmund Horner <ejrh00@gmail.com>) |
Ответы |
Re: Tid scan improvements
|
Список | pgsql-hackers |
On 15 August 2018 at 11:11, Edmund Horner <ejrh00@gmail.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.
В списке pgsql-hackers по дате отправления: