Re: Re: Query > 1000× slowdown after adding datetime comparison - Mailing list pgsql-performance

From twoflower
Subject Re: Re: Query > 1000× slowdown after adding datetime comparison
Date
Msg-id 1441101110741-5864173.post@n5.nabble.com
Whole thread Raw
In response to Re: [PERFORM] Re: Query > 1000× slowdown after adding datetime comparison  (林士博 <lin@repica.co.jp>)
Responses Re: [PERFORM] Re: Query > 1000× slowdown after adding datetime comparison
List pgsql-performance
林士博 wrote
> I think you should try putting the precomputed boolean temp_eval column
> to "EXTERNAL_TRANSLATION" r table.
>
> And if possible, try creating a conditional index on id where temp_eval is
> true,
> on "EXTERNAL_TRANSLATION" r table.
>
> So that, only check this index can get the top 1000 records.

I agree that might help. But I would still like to understand what's the
reason for difference between the second and the third query. Both contain a
simple <column> = <constant> expression, yet one finishes immediately and
one runs for 41 minutes.




--
View this message in context:
http://postgresql.nabble.com/Query-1-000-000-slowdown-after-adding-datetime-comparison-tp5864045p5864173.html
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.


pgsql-performance by date:

Previous
From: 林士博
Date:
Subject: Re: [PERFORM] Re: Query > 1000× slowdown after adding datetime comparison
Next
From: 林士博
Date:
Subject: Re: [PERFORM] Re: Query > 1000× slowdown after adding datetime comparison