Re: Query > 1000× slowdown after adding datetime comparison

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Query > 1000× slowdown after adding datetime comparison
Date: 2015-08-31 16:19:35
Message-ID: 55E47E97.1090202@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 08/31/2015 06:09 PM, twoflower wrote:
> I have the following three tables:
...
> This is the query plan:
>
> <http://postgresql.nabble.com/file/n5864045/qp1.png>
>
> If I remove the WHERE condition, it returns immediately.
>
> Am I doing something obviously wrong?

Please share explain plans for both the slow and the fast query. That
makes it easier to spot the difference, and possibly identify the cause.

Also, what PostgreSQL version is this, and what are "basic" config
parameters (shared buffers, work mem)?

regards

--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message David G. Johnston 2015-08-31 16:35:03 Re: [PERFORM] Query > 1000× slowdown after adding datetime comparison
Previous Message twoflower 2015-08-31 16:09:11 Query > 1000× slowdown after adding datetime comparison