Re: [SQL] ERROR: DefineQueryRewrite: rule plan string too big.
От | wieck@debis.com (Jan Wieck) |
---|---|
Тема | Re: [SQL] ERROR: DefineQueryRewrite: rule plan string too big. |
Дата | |
Msg-id | m118h3s-0003kvC@orion.SAPserv.Hamburg.dsh.de обсуждение исходный текст |
Ответ на | Re: [SQL] ERROR: DefineQueryRewrite: rule plan string too big. (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-sql |
Tom Lane wrote: > I originally thought that this wouldn't work because the final parsetree > for the top query would incorporate the other two parsetrees and still > be too big. But it looks like it doesn't --- when I experimented just > now, the stored parsetree for a view referencing another view treated > the sub-view as just a table with no inner structure. I suppose the > expansion doesn't happen until plan/optimize time. It happens during rewrite time. The querytree stored for rules is just the UNrewritten output of the parser. That's why the rewriter is recursively calling itself with it's own output. So splitting up such a huge view into a tree of views (if possible) is a solution that must not result in a different final querytree (after applying all view rules). It just takes a little more time for the rewrite step - but I cannot estimate how much more. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #========================================= wieck@debis.com (Jan Wieck) #
В списке pgsql-sql по дате отправления: