From: | Volkan YAZICI <yazicivo(at)ttnet(dot)net(dot)tr> |
---|---|
To: | Greg Mitchell <gmitchell(at)atdesk(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Storing a dynahash for an entire connection or transaction? |
Date: | 2006-11-27 17:26:03 |
Message-ID: | 20061127172603.GA1448@alamut |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On Nov 27 10:57, Greg Mitchell wrote:
> I've now got to custom datatypes that map from an int2 value on disk to
> a string by way of a table for each. Currently, I load these tables into
> a dynahash per function call (fcinfo->flinfo->fn_extra). This is working
> great is most situations. The problem situation is where there are many
> queries (often INSERTS) that need to happen in a short amount of time.
> This causes reloads of the dynahash (or hashes) for each query, making
> them orders of magnitude slower than when these columns were varchar.
>
> What I'd like to do is change the way I store this hash so that it
> doesn't need to be as frequently updated. I'm open to most any solution.
> One type rarely ever has new values (maybe once every several months)
> and the other gets new values once a night.
You may want to cache these values using a static variable (which will
make itself to be valid per session) that stores its values in the
(for instance) TopTransactionContext.
Regards.
From | Date | Subject | |
---|---|---|---|
Next Message | Hannu Krosing | 2006-11-27 17:49:01 | Re: Integrating Replication into Core |
Previous Message | Simon Riggs | 2006-11-27 17:02:28 | Re: Configuring BLCKSZ and XLOGSEGSZ (in 8.3) |