| From: | "petrov(dot)boris(dot)v(at)mail(dot)ru" <petrov(dot)boris(dot)v(at)mail(dot)ru> |
|---|---|
| To: | Jayadevan M <maymala(dot)jayadevan(at)gmail(dot)com> |
| Cc: | "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org> |
| Subject: | Re: Different performance of two simple queries |
| Date: | 2015-11-17 13:29:52 |
| Message-ID: | 564B2BD0.1070104@mail.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
On 11/17/2015 02:44 PM, Jayadevan M wrote:
> I would say it is normal. Please read this for explanation :
> http://blog.2ndquadrant.com/postgresql-ctes-are-optimization-fences/
Thanks for the link, now I also recall, that I already read about this
in section 7.8. of docs.
I turns out that in second query I am kind of abused CTE by something
that looks like side-effect. Not sure about how code with this "unneeded
CTE-ism" will be perceived by others. But definitely it is better to
have such option than not to.
In my case, actually, performance of both queries totally meet
requirements so I keep the "normal" query.
Thanks.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Convey | 2015-11-17 15:49:15 | Re: [pgsql-novice] Daily digest v1.3706 (6 messages) |
| Previous Message | Jayadevan M | 2015-11-17 11:44:53 | Re: Different performance of two simple queries |