Re: [HACKERS] CTE inlining
От
Andreas Karlsson
Тема
Re: [HACKERS] CTE inlining
Дата
Msg-id
570bfb75-43ac-b423-8d4a-2a6f55219d92@proxel.se
Ответ на
Re: [HACKERS] CTE inlining (Craig Ringer)
Список
Дерево обсуждения
[HACKERS] CTE inlining Ilya Shkuratov <motr.ilya@ya.ru>
Re: [HACKERS] CTE inlining Yaroslav <ladayaroslav@yandex.ru>
Re: [HACKERS] CTE inlining Andreas Joseph Krogh <andreas@visena.com>
Re: [HACKERS] CTE inlining Thomas Kellerer <spam_eater@gmx.net>
Re: [HACKERS] CTE inlining Craig Ringer <craig.ringer@2ndquadrant.com>
Re: [HACKERS] CTE inlining Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] CTE inlining Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [HACKERS] CTE inlining David Fetter <david@fetter.org>
Re: [HACKERS] CTE inlining Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] CTE inlining Andres Freund <andres@anarazel.de>
Re: [HACKERS] CTE inlining Gavin Flower <GavinFlower@archidevsys.co.nz>
Re: [HACKERS] CTE inlining Serge Rielau <serge@rielau.com>
Re: [HACKERS] CTE inlining Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] CTE inlining Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: [HACKERS] CTE inlining Andreas Karlsson <andreas@proxel.se>
Re: [HACKERS] CTE inlining Craig Ringer <craig.ringer@2ndquadrant.com>
Re: [HACKERS] CTE inlining "David G. Johnston" <david.g.johnston@gmail.com>
Re: [HACKERS] CTE inlining Andres Freund <andres@anarazel.de>
Re: [HACKERS] CTE inlining Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: [HACKERS] CTE inlining Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] CTE inlining Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] CTE inlining Joe Conway <mail@joeconway.com>
Re: [HACKERS] CTE inlining Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: [HACKERS] CTE inlining Joe Conway <mail@joeconway.com>
Re: [HACKERS] CTE inlining Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [HACKERS] CTE inlining Gavin Flower <GavinFlower@archidevsys.co.nz>
Re: [HACKERS] CTE inlining Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] CTE inlining Serge Rielau <serge@rielau.com>
Re: [HACKERS] CTE inlining Craig Ringer <craig.ringer@2ndquadrant.com>
Re: [HACKERS] CTE inlining Joe Conway <mail@joeconway.com>
Re: [HACKERS] CTE inlining Craig Ringer <craig.ringer@2ndquadrant.com>
Re: [HACKERS] CTE inlining Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] CTE inlining Stephen Frost <sfrost@snowman.net>
Re: [HACKERS] CTE inlining Joe Conway <mail@joeconway.com>
Re: [HACKERS] CTE inlining Andres Freund <andres@anarazel.de>
Re: [HACKERS] CTE inlining David Rowley <david.rowley@2ndquadrant.com>
Re: [HACKERS] CTE inlining Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] CTE inlining "David G. Johnston" <david.g.johnston@gmail.com>
Re: [HACKERS] CTE inlining Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] CTE inlining "David G. Johnston" <david.g.johnston@gmail.com>
Re: [HACKERS] CTE inlining Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] CTE inlining Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: [HACKERS] CTE inlining Serge Rielau <serge@rielau.com>
Re: [HACKERS] CTE inlining Serge Rielau <serge@rielau.com>
Re: [HACKERS] CTE inlining Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [HACKERS] CTE inlining Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: [HACKERS] CTE inlining Pavel Stehule <pavel.stehule@gmail.com>
Re: [HACKERS] CTE inlining Andres Freund <andres@anarazel.de>
Re: [HACKERS] CTE inlining Pavel Stehule <pavel.stehule@gmail.com>
Re: [HACKERS] CTE inlining Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [HACKERS] CTE inlining Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: [HACKERS] CTE inlining David Fetter <david@fetter.org>
Re: [HACKERS] CTE inlining Andreas Karlsson <andreas@proxel.se>
Re: [HACKERS] CTE inlining Corey Huinker <corey.huinker@gmail.com>
Re: [HACKERS] CTE inlining "David G. Johnston" <david.g.johnston@gmail.com>
Re: [HACKERS] CTE inlining Andreas Karlsson <andreas@proxel.se>
Re: [HACKERS] CTE inlining "David G. Johnston" <david.g.johnston@gmail.com>
Re: [HACKERS] CTE inlining Craig Ringer <craig@2ndquadrant.com>
Re: [HACKERS] CTE inlining Andreas Karlsson <andreas@proxel.se>
Re: [HACKERS] CTE inlining David Fetter <david@fetter.org>
Re: [HACKERS] CTE inlining Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [HACKERS] CTE inlining Merlin Moncure <mmoncure@gmail.com>
Re: [HACKERS] CTE inlining Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [HACKERS] CTE inlining Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: [HACKERS] CTE inlining Craig Ringer <craig@2ndquadrant.com>
Re: [HACKERS] CTE inlining Thomas Kellerer <spam_eater@gmx.net>
Re: [HACKERS] CTE inlining Claudio Freire <klaussfreire@gmail.com>
Re: [HACKERS] CTE inlining David Fetter <david@fetter.org>
Re: [HACKERS] CTE inlining Claudio Freire <klaussfreire@gmail.com>
Re: [HACKERS] CTE inlining David Fetter <david@fetter.org>
Re: [HACKERS] CTE inlining Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] CTE inlining Gavin Flower <GavinFlower@archidevsys.co.nz>
Re: [HACKERS] CTE inlining Thomas Kellerer <spam_eater@gmx.net>
Re: [HACKERS] CTE inlining Albe Laurenz <laurenz.albe@wien.gv.at>
Re: [HACKERS] CTE inlining Kenneth Marshall <ktm@rice.edu>
Re: [HACKERS] CTE inlining Gavin Flower <GavinFlower@archidevsys.co.nz>
Re: [HACKERS] CTE inlining Andreas Karlsson <andreas@proxel.se>
Re: [HACKERS] CTE inlining Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [HACKERS] CTE inlining Pavel Stehule <pavel.stehule@gmail.com>
Re: [HACKERS] CTE inlining Merlin Moncure <mmoncure@gmail.com>
Re: [HACKERS] CTE inlining Petr Jelinek <petr.jelinek@2ndquadrant.com>
Re: [HACKERS] CTE inlining Julien Rouhaud <julien.rouhaud@dalibo.com>
Re: [HACKERS] CTE inlining Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: [HACKERS] CTE inlining Vik Fearing <vik.fearing@2ndquadrant.com>
Re: [HACKERS] CTE inlining Ilya Shkuratov <motr.ilya@ya.ru>
Re: [HACKERS] CTE inlining Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] CTE inlining Bruce Momjian <bruce@momjian.us>
Re: [HACKERS] CTE inlining Merlin Moncure <mmoncure@gmail.com>
Re: [HACKERS] CTE inlining David Rowley <david.rowley@2ndquadrant.com>
Re: [HACKERS] CTE inlining Adam Brusselback <adambrusselback@gmail.com>
Re: [HACKERS] CTE inlining Pavel Stehule <pavel.stehule@gmail.com>
Re: [HACKERS] CTE inlining Corey Huinker <corey.huinker@gmail.com>
Re: [HACKERS] CTE inlining Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: [HACKERS] CTE inlining Craig Ringer <craig@2ndquadrant.com>
Re: [HACKERS] CTE inlining Craig Ringer <craig@2ndquadrant.com>
Re: [HACKERS] CTE inlining Craig Ringer <craig@2ndquadrant.com>
Re: [HACKERS] CTE inlining Thomas Kellerer <spam_eater@gmx.net>
Re: [HACKERS] CTE inlining Oleg Bartunov <obartunov@gmail.com>
Re: [HACKERS] CTE inlining Merlin Moncure <mmoncure@gmail.com>
Re: [HACKERS] CTE inlining Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: [HACKERS] CTE inlining Tomas Vondra <tomas.vondra@2ndquadrant.com>
On 05/02/2017 04:38 AM, Craig Ringer wrote: > On 1 May 2017 at 22:26, Andreas Karlsson wrote: >> I am not sure I like decorators since this means adding an ad hoc query hint >> directly into the SQL syntax which is something which I requires serious >> consideration. > > And mangling the semantics of existing syntax doesn't? > > That's what we do right now so we can pretend we don't have query > hints while still having query hints. I am in favor of removing the optimization fence from CTEs, and strongly prefer no fence being the default behavior since SQL is a declarative language and I think it is reasonable to assume that CTEs can be inlined. But the question is how to best remove the fence while taking into account that quite many use them as optimization fences today. I see some alternatives, none of them perfect. 1. Just remove the optimization fence and let people add OFFSET 0 to their queries if they want an optimization fence. This lets us keep pretending that we do not have query hints (and therefore do not have to formalize any syntax for them) while still allowing people to add optimization fences. 2. Add a decorator for WITH (e.g. "WITH MATERIALIZED x (...") to add an explicit optimization fence. This will for the first time add official support for a query hint in the syntax which is a quite big precedent. 3. Add a new GUC which can enable and disable the optimization fence. This is a very clumsy tool, but maybe good enough for some users and some people here in this thread have complained about our similar GUCs. 4. Add some new more generic query hinting facility. This is a lot of work and something which would be very hard to get consensus for. Andreas
В списке pgsql-hackers по дате отправления
От: Michael Paquier
Дата: