From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: Kevin Viraud <kevin.viraud@rocket-internet.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: Weird CASE WHEN behaviour causing query to be suddenly very slow
Date: Tue, 7 Apr 2015 18:38:38 -0500
Message-ID: <55246A7E.9060800@BlueTreble.com> (raw)
In-Reply-To: <00d301d06bcb$997cf220$cc76d660$@rocket-internet.de>
References: <00a001d06b90$2d1bbe80$87533b80$@rocket-internet.de>
<16234.1427810310@sss.pgh.pa.us>
<00d301d06bcb$997cf220$cc76d660$@rocket-internet.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
On 3/31/15 10:58 AM, Kevin Viraud wrote:
> Touche ! Thanks a lot.
>
> Looking more at the data yes it goes very often to ELSE Clause. And
> therefore reaching the MAX_CACHED_RES.
>
> In there anyway to increase that value ?
Sure, change it and re-compile. But be aware that increasing it will
probably increase the cost of some other stuff, so it's a tradeoff.
If this is that complex though you very likely would do better in
plperl, especially if you could pre-compile the RE's. AFAIK there's no
way to do that in Postgres, though it might be interesting to add that
ability.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: Jim.Nasby@BlueTreble.com, kevin.viraud@rocket-internet.de, tgl@sss.pgh.pa.us
Subject: Re: Weird CASE WHEN behaviour causing query to be suddenly very slow
In-Reply-To: <55246A7E.9060800@BlueTreble.com>
* 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