Re: Storing a dynahash for an entire connection or transaction?
От | Volkan YAZICI |
---|---|
Тема | Re: Storing a dynahash for an entire connection or transaction? |
Дата | |
Msg-id | 20061127172603.GA1448@alamut обсуждение исходный текст |
Ответ на | Storing a dynahash for an entire connection or transaction? (Greg Mitchell <gmitchell@atdesk.com>) |
Ответы |
Re: Storing a dynahash for an entire connection or transaction?
|
Список | 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.
В списке pgsql-hackers по дате отправления: