From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rhhh Lin <ruanlinehan@hotmail.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: EXPLAIN <query> command just hangs...
Date: Thu, 02 Nov 2017 17:40:16 -0400
Message-ID: <14805.1509658816@sss.pgh.pa.us> (raw)
In-Reply-To: <DB6PR1001MB11419068A9E3CC94B5A29FF0AE5C0@DB6PR1001MB1141.EURPRD10.PROD.OUTLOOK.COM>
References: <DB6PR1001MB1141C4DADE28C72A27D70D78AE5C0@DB6PR1001MB1141.EURPRD10.PROD.OUTLOOK.COM>
<20171102210228.GA2267@telsasoft.com>
<DB6PR1001MB11419068A9E3CC94B5A29FF0AE5C0@DB6PR1001MB1141.EURPRD10.PROD.OUTLOOK.COM>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
Rhhh Lin <ruanlinehan@hotmail.com> writes:
> The EXPLAIN <query> statement is currently 'f' for waiting and 'active' via pg_stat_activity, so it is doing something. The ps command does not show me anything more verbose.
ps would confirm for sure whether it was eating CPU time, whereas I do not
particularly trust pg_stat_activity to tell you that.
> The reason I am very suspect of the timestamp column makeup is that if I
> remove that predicate from the EXPLAIN command and the actual query,
> both complete within seconds without issue.
We've seen issues with the planner having trouble trying to determine the
extreme values of an indexed column, in cases where there are a lot of
uncommitted or recently-dead entries at the end of the index --- it does
a lot of work trying to verify the commit status of each entry in turn.
So I wonder if that might apply.
regards, tom lane
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, ruanlinehan@hotmail.com, pryzby@telsasoft.com
Subject: Re: EXPLAIN <query> command just hangs...
In-Reply-To: <14805.1509658816@sss.pgh.pa.us>
References: <DB6PR1001MB1141C4DADE28C72A27D70D78AE5C0@DB6PR1001MB1141.EURPRD10.PROD.OUTLOOK.COM> <20171102210228.GA2267@telsasoft.com> <DB6PR1001MB11419068A9E3CC94B5A29FF0AE5C0@DB6PR1001MB1141.EURPRD10.PROD.OUTLOOK.COM> <14805.1509658816@sss.pgh.pa.us>
* 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