Re: More efficient RI checks - take 2

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: More efficient RI checks - take 2
Дата
Msg-id 20200421153454.GA19350@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: More efficient RI checks - take 2  (Corey Huinker <corey.huinker@gmail.com>)
Ответы Re: More efficient RI checks - take 2
Re: More efficient RI checks - take 2
Список pgsql-hackers
On 2020-Apr-20, Corey Huinker wrote:

> > I can imagine removal of the SPI from the current implementation (and
> > constructing the plans "manually"), but note that the queries I use in my
> > patch are no longer that trivial. So the SPI makes sense to me because it
> > ensures regular query planning.
> 
> As an intermediate step, in the case where we have one row, it should be
> simple enough to extract that row manually, and do an SPI call with fixed
> values rather than the join to the ephemeral table, yes?

I do wonder if the RI stuff would actually end up being faster without
SPI.  If not, we'd only end up writing more code to do the same thing.
Now that tables can be partitioned, it is much more of a pain than when
only regular tables could be supported.  Obviously without SPI you
wouldn't *have* to go through the planner, which might be a win in
itself if the execution tree to use were always perfectly clear ... but
now that the queries get more complex per partitioning and this
optimization, is it?

You could remove the crosscheck_snapshot feature from SPI, I suppose,
but that's not that much code.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andreas Karlsson
Дата:
Сообщение: Re: [PATCH] distinct aggregates within a window function WIP
Следующее
От: Andres Freund
Дата:
Сообщение: Re: design for parallel backup