Re: regex cache

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: regex cache
Date: 2008-06-18 22:08:47
Message-ID: 8584.1213826927@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus <josh(at)agliodbs(dot)com> writes:
> Tom Lane wrote:
>> Hmm. Well, I still don't want to tie it to work_mem; how do you feel
>> about a new GUC to determine the max number of cached REs?

> Yeah. You know me, I was just trying to avoid having more GUCs.

I'm not excited about it either, but I think if we're going to make
this adjustable it does need its own knob. I can easily believe
that a large list of precompiled GUCs could be counterproductive
given a workload where you don't get much reuse, so I don't want
the list size going to the moon just because someone cranked up
work_mem for other purposes.

(I'm not real sure that that "self-organizing list" data structure
would work well beyond 1000 or so entries even if you did have
enough re-use to justify them all. Anyone want to try to do some
performance testing? In particular I think we might want to drop
the move-to-front approach in favor of move-up-one, just to avoid
O(N^2) memmove costs.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2008-06-18 22:31:55 Re: regex cache
Previous Message Josh Berkus 2008-06-18 21:54:00 Re: regex cache