Hi,
On 5/24/17 7:04 PM, Dinesh Chandra 12108 wrote:
> Dear Expert,
>
> While executing the blow query, its taking too long time to fetch output.
>
> Could you please help to fine tune the same?
>
You'll have to provide far more details - the query alone is certainly
not enough for anyone to guess why it's slow. Perhaps look at this:
https://wiki.postgresql.org/wiki/Slow_Query_Questions
In particular, you'll have to tell us
(a) something about the hardware it's running on
(b) amounts of data in the tables / databases
(c) EXPLAIN or even better EXPLAIN ANALYZE of the query
(d) configuration of the database (work_mem, shared_buffers etc.)
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services