Re: Repeated execution of identical subqueries
| От | Craig Ringer |
|---|---|
| Тема | Re: Repeated execution of identical subqueries |
| Дата | |
| Msg-id | 47D8CB14.8020400@postnewspapers.com.au обсуждение исходный текст |
| Ответ на | Re: Repeated execution of identical subqueries (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Repeated execution of identical subqueries
|
| Список | pgsql-performance |
Tom Lane wrote: > No, not at the moment. In principle the planner could look for such > duplicates, but it'd be wasted cycles so much of the time that I'd be > loath to do it. > Good point - there are better places to spend time, and I imagine it'd be an expensive thing to check too. > There is work afoot to implement the SQL:2003 "WITH" syntax, which > I think would offer a syntactic solution to your problem. Yes, it would. In fact, I was thinking about the syntax seen in some functional languages - like Haskell's `where' clause - that defines a subexpression available to all parts of the expression. If the SQL:2003 WITH expression is anything like that it'd be very handy indeed. -- Craig Ringer
В списке pgsql-performance по дате отправления: