Re: [HACKERS] Parameterization of partial path
От | Antonin Houska |
---|---|
Тема | Re: [HACKERS] Parameterization of partial path |
Дата | |
Msg-id | 1296.1486735201@localhost обсуждение исходный текст |
Ответ на | Re: [HACKERS] Parameterization of partial path (Robert Haas <robertmhaas@gmail.com>) |
Список | pgsql-hackers |
Robert Haas <robertmhaas@gmail.com> wrote: > On Thu, Feb 9, 2017 at 12:36 PM, Antonin Houska <ah@cybertec.at> wrote: > > When looking at try_partial_hashjoin_path and try_partial_nestloop_path > > functions I'm failing to understand the comment "Parameterized partial paths > > are not supported.". > > > > It's clear to me that GatherPath can't have parameters because repeated > > execution of parallel plan with adjusted parameters is not supported. > > Actually, I think in theory that is fine. You'd start up and shut > down workers for every execution, which is likely to stink in terms of > performance, but it should work OK. The only problem is that it'll > only work if you pass the values of the parameters down to the worker > processes, which the code currently doesn't. Bind parameters sent by > the user are passed down, but there's no provision to pass down > parameters populated at execution time. Amit has written code for > that, though, and it's been posted here. It just hasn't gotten into > the tree yet for one reason or another. ok, I also thought it's about missing implementation rather than principal issue. > > But the > > fact that generic partial path has parameters should not be a problem if those > > parameters are satisfied below the nearest GatherPath node higher in the plan > > tree. Do I miss anything of the concept? > > Yes, I think you're missing a key point. A parameterized path would > normally be used for a query like small LJ (big1 IJ big2 ON big1.x = > big2.x) ON big1.y = small.y. The plan might look like this: Thanks for detailed explanation. I think the missing point in my thoughts was that the only way to satisfy parameters of a relation (so that Gather does not have to pass any parameters) is to put the relation on the inner side of a join. However the inner side must provide the whole result set, not just part of it, else the result is wrong. -- Antonin Houska Cybertec Schönig & Schönig GmbH Gröhrmühlgasse 26 A-2700 Wiener Neustadt Web: http://www.postgresql-support.de, http://www.cybertec.at
В списке pgsql-hackers по дате отправления: