Re: Different performance of two simple queries - Mailing list pgsql-novice

From petrov.boris.v@mail.ru
Subject Re: Different performance of two simple queries
Date
Msg-id 564B2BD0.1070104@mail.ru
Whole thread Raw
In response to Re: Different performance of two simple queries  (Jayadevan M <maymala.jayadevan@gmail.com>)
List 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.




pgsql-novice by date:

Previous
From: Jayadevan M
Date:
Subject: Re: Different performance of two simple queries
Next
From: Michael Convey
Date:
Subject: Re: [pgsql-novice] Daily digest v1.3706 (6 messages)