Re: explain analyze faster then query

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Mariel Cherkassky <mariel(dot)cherkassky(at)gmail(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: explain analyze faster then query
Date: 2018-11-25 13:30:02
Message-ID: 20181125133002.GP10913@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-performance

Cc: pgsql-performance(at)lists(dot)postgresql(dot)org,
pgsql-admin(at)lists(dot)postgresql(dot)org

Please avoid simultaneously sending the same question to multiple lists.

It means that people can't see each others replies and everything that implies.

On Sun, Nov 25, 2018 at 03:08:33PM +0200, Mariel Cherkassky wrote:
> However when I run the query without the explain analyze it takes forever
> to run it(More then two hours).
> Is there a possibility that it is related to fetching or something like
> that ?

If it's a remote database, I expect that's why.
Maybe you can test by running the query on the DB server.
Or by running another variant of the query, such as:

WITH x AS (QUERY GOES HERE) SELECT 1;

which returns only one row but after having executed the query behind CTE, as
optimization fence.

Justin

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Mariel Cherkassky 2018-11-25 13:37:46 Re: explain analyze faster then query
Previous Message Mariel Cherkassky 2018-11-25 13:08:33 explain analyze faster then query

Browse pgsql-performance by date

  From Date Subject
Next Message Mariel Cherkassky 2018-11-25 13:37:46 Re: explain analyze faster then query
Previous Message Mariel Cherkassky 2018-11-25 13:08:33 explain analyze faster then query