From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Rob Sargent <robjsargent@gmail.com>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: query not scaling
Date: Thu, 26 Oct 2017 09:02:43 +0200
Message-ID: <1509001363.2666.1.camel@cybertec.at> (raw)
In-Reply-To: <6f7d4fd4-aed2-2fae-f551-d0f67196da33@gmail.com>
References: <6f7d4fd4-aed2-2fae-f551-d0f67196da33@gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, robjsargent@gmail.com
Subject: Re: query not scaling
In-Reply-To: <1509001363.2666.1.camel@cybertec.at>
References: <6f7d4fd4-aed2-2fae-f551-d0f67196da33@gmail.com> <1509001363.2666.1.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox