| From: | twoflower <standa(dot)kurik(at)gmail(dot)com> |
|---|---|
| To: | pgsql-performance(at)postgresql(dot)org |
| Subject: | Re: Query > 1000× slowdown after adding datetime comparison |
| Date: | 2015-08-31 19:19:23 |
| Message-ID: | 1441048763332-5864080.post@n5.nabble.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
And another thing which comes out as a little surprising to me - if I replace
the *date_last_updated* condition with another one, say *doc.documenttype =
4*, the query finishes immediately. *documenttype* is an unindexed integer
column.
Here's the query plan:
<http://postgresql.nabble.com/file/n5864080/qp3.png>
What's so special about that *date_last_updated* condition that makes it so
slow to use? Is it because it involves the *date()* function call that it
makes it difficult for the planner to guess the data distribution in the
DOCUMENT table?
--
View this message in context: http://postgresql.nabble.com/Query-1-000-000-slowdown-after-adding-datetime-comparison-tp5864045p5864080.html
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David G. Johnston | 2015-08-31 19:22:53 | Re: [PERFORM] Re: Query > 1000× slowdown after adding datetime comparison |
| Previous Message | twoflower | 2015-08-31 19:03:50 | Re: Query > 1000× slowdown after adding datetime comparison |