Re: Weird CASE WHEN behaviour causing query to be suddenly very slow - Mailing list pgsql-performance

From Jim Nasby
Subject Re: Weird CASE WHEN behaviour causing query to be suddenly very slow
Date
Msg-id 55246A7E.9060800@BlueTreble.com
Whole thread Raw
In response to Re: Weird CASE WHEN behaviour causing query to be suddenly very slow  ("Kevin Viraud" <kevin.viraud@rocket-internet.de>)
List pgsql-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


pgsql-performance by date:

Previous
From: Jim Nasby
Date:
Subject: Re: views much slower in 9.3 than 8.4
Next
From: Qingqing Zhou
Date:
Subject: Re: Weird CASE WHEN behaviour causing query to be suddenly very slow