I was able to add the suggested indexes
like stage.event__00075000((body->>'SID'::text)); and indeed these helped
the QA environment use those indexes instead of sequence scanning.
I'm still perplexed by my original question, why production uses the
partition index and qa does not?
Index Scan
On 21 September 2017 at 04:15, Mike Broers wrote:
> Ultimately I think this is just highlighting the need in my environment to
> set random_page_cost lower (we are on an SSD SAN anyway..), but I dont think
> I have a satisfactory reason by the row estimates are so bad in the QA
On Tue, Sep 19, 2017 at 7:31 PM, monika yadav
wrote:
> Hi All,
>
> I didn't understand why same sub plan for the sub query executed two
> times? As per the query it should have been executed only once.
>
> Can someone please explain this behaviour of query execution ?