From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | Rob Sargent <robjsargent(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: query not scaling |
Date: | 2017-10-26 07:02:43 |
Message-ID: | 1509001363.2666.1.camel@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Rob Sargent wrote:
> I have a query I cannot tame and I'm wondering if there's an alternative
> to the "between" clause I'm using. Perhaps a custom type could do
> better? I've tried the "<@" orperator and that changes the query plan
> significantly but the execution cost/time is not improved.
>
> Any suggestion or pointers much appreciated.
You really need EXPLAIN (ANALYZE, BUFFERS) output to be able to
undersrand what is going on.
A couple of simple things to check:
- Have all tables been ANALYZED beforehand?
- Are all optimizer database parameters identical?
Also, to have PostgreSQL inline the function, which would be good
for performance, it should be declared IMMUTABLE.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2017-10-26 12:41:31 | Re: Making subscribers read only in Postgres 10 logical replication |
Previous Message | Celia McInnis | 2017-10-25 21:33:53 | Re: How do I insert and update into a table of arrays of composite types via a select command? |