From: mlunnon <mlunnon@rwa-net.co.uk>
To: pgsql-performance@postgresql.org
Subject: Re: Help me in reducing the CPU cost for the high cost query below, as it is hitting production seriously!!
Date: Wed, 23 May 2018 04:12:10 -0700 (MST)
Message-ID: <1527073930538-0.post@n3.nabble.com> (raw)
In-Reply-To: <1526985179479-0.post@n3.nabble.com>
References: <1526883356469-0.post@n3.nabble.com>
<1526917693149-0.post@n3.nabble.com>
<1526985179479-0.post@n3.nabble.com>
Hi Pavan,
that's quite a big query. I can see that the generate_series function is
getting repeatedly called and the planner estimates for this sub query are
out by a factor of 66. You might try to re-write using a WITH query. I am
assuming that you have already analyzed all the tables and also added
appropriate indexes on join/query columns.
Regards
Matthew
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-performance-f2050081.html
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: mlunnon@rwa-net.co.uk
Subject: Re: Help me in reducing the CPU cost for the high cost query below, as it is hitting production seriously!!
In-Reply-To: <1527073930538-0.post@n3.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox