From: | Stefan Keller <sfkeller(at)gmail(dot)com> |
---|---|
To: | twoflower <standa(dot)kurik(at)gmail(dot)com> |
Cc: | "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: [PERFORM] Re: Query > 1000× slowdown after adding datetime comparison |
Date: | 2015-08-31 21:00:28 |
Message-ID: | CAFcOn2_1tknJ95JceZY1ikP1OURwgwuRFSQX21SJTLFF+ZzdRA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
So, if I'm understanding you correctly, we're talking solely about
following clause in the query you gave initially:
WHERE doc.date_last_updated >= date(now() - '171:00:00'::interval)
which initially was
WHERE documenttype = 4
and now is being replaced by a temporary (I'd say derived) column
WHERE updated
?
In any case - I have to go - but run http://explain.depesz.com/ and
give a weblink to the explain plans of your queries.
-S.
2015-08-31 22:30 GMT+02:00 twoflower <standa(dot)kurik(at)gmail(dot)com>:
> I did not. I wanted to compare this query to the one I tried before, having
> *documenttype = 4* as the sole condition. That one was very fast and the
> *documenttype* was not indexed either.
>
> But this query, using the new temporary column, still runs, after 48
> minutes...
>
>
>
> --
> View this message in context: http://postgresql.nabble.com/Query-1-000-000-slowdown-after-adding-datetime-comparison-tp5864045p5864101.html
> Sent from the PostgreSQL - performance mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-performance mailing list (pgsql-performance(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance
From | Date | Subject | |
---|---|---|---|
Next Message | twoflower | 2015-09-01 07:53:45 | Re: Re: Query > 1000× slowdown after adding datetime comparison |
Previous Message | twoflower | 2015-08-31 20:30:41 | Re: Re: Query > 1000× slowdown after adding datetime comparison |