pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: twoflower <standa.kurik@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Re: Query > 1000× slowdown after adding datetime comparison
Date: Mon, 31 Aug 2015 12:46:56 -0700 (MST)
Message-ID: <1441050416677-5864088.post@n5.nabble.com> (raw )
In-Reply-To: <CAKFQuwbUZLWuhoaAF7mWdmRr-6LG9NdMfsyPasXo1ZY82YVRzA@mail.gmail.com >
References: <1441037351126-5864045.post@n5.nabble.com >
<55E47E97.1090202@2ndquadrant.com >
<1441047830983-5864075.post@n5.nabble.com >
<1441048763332-5864080.post@n5.nabble.com >
<CAKFQuwbUZLWuhoaAF7mWdmRr-6LG9NdMfsyPasXo1ZY82YVRzA@mail.gmail.com >
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
David G Johnston wrote
> What happens if you pre-compute the date condition and hard code it?
I created a new boolean column and filled it for every row in DOCUMENT with
*(doc.date_last_updated >= date(now() - '171:00:00'::interval))*, reanalyzed
the table and modified the query to just compare this column to TRUE. I
expected this to be very fast, considering that a (to me, anyway) similar
query also containing a constant value comparison finishes immediately.
However, the query is running now for 4 minutes already. That's really
interesting.
--
View this message in context: http://postgresql.nabble.com/Query-1-000-000-slowdown-after-adding-datetime-comparison-tp5864045p586...
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
view thread (15+ messages) latest in thread
Message-ID: <1441050416677-5864088.post@n5.nabble.com>
Permalink: ../1441050416677-5864088.post@n5.nabble.com/
Also on: postgresql.org/message-id/1441050416677-5864088.post@n5.nabble.com
copy link · copy postgr.es
reply 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: standa.kurik@gmail.com
Subject: Re: Re: Query > 1000× slowdown after adding datetime comparison
In-Reply-To: <1441050416677-5864088.post@n5.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