| От | Michael Fuhr |
|---|---|
| Тема | Re: Caching/Indexing Function Output |
| Дата | |
| Msg-id | 20041224042044.GA89583@winnie.fuhr.org обсуждение |
| Ответ на | Caching/Indexing Function Output ("Mike" <mike@mrhost.ca>) |
| Список | pgsql-general |
On Thu, Dec 23, 2004 at 01:22:42PM -0800, Mike wrote:
> My question is- is there anyway, since a call to sp_host('10.0.0.1') will
> always
> return the same value (the primary key/sequence value from the ip_addresses
> table), to cache/index that value somehow, so anytime I ever call that same
> function, with the same argument, it returns a cached/indexed value?
Some procedural languages (PL/Tcl, PL/Python; also PL/Perl in 8.0)
have global data that you could use as a cache. The function would
still be called each time, but you could at least use the cache to
save the cost of a database query.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера