Skip site navigation (1) Skip section navigation (2)

Re: caching table/query

From: Tsirkin Evgeny <tsurkin(at)mail(dot)jct(dot)ac(dot)il>
To: Chris Travers <chris(at)verkiel(dot)metatrontech(dot)com>
Cc: Tsirkin Evgeny <tsurkin(at)jct(dot)ac(dot)il>, pgsql-admin(at)postgresql(dot)org
Subject: Re: caching table/query
Date: 2005-07-20 07:25:59
Message-ID: 42DDFC87.1000807@mail.jct.ac.il (view raw or flat)
Thread:
Lists: pgsql-admin
Well ,here is something that might be interesting:
trying to reduce query time and since that is a web application i now 
using caching with
perl MLDBM::Sync::SDBM_File on application level .(Basically that 
involves quering all the
table and putting it into MLDBM::Sync::SDBM_File and then quering it 
back ) .What is
 interesting is that while  time quering the tables from postgres is 
taken 0.3 sec. using sdbm
it takes 0.1 sec.
Actually i am not anymore sure that postgres does NOT cache table in memory,
maybe it does and i don't know about it?Maybe the time is spended in 
transmitting the data
from postgres to the application? How can i test this?
Thanks.

Chris Travers wrote:

> Tsirkin Evgeny wrote:
>
>>
>> Well i guess that there are cases where that is not so.However i 
>> understand that postgres does not have any way accept
>> the automatic. 
>
>
> Largely true.  There may be ways of forcing a from-memory query once 
> the system is in place, but I am not sure that this is always what you 
> want, it would not be pretty, and might have some real performance 
> issues.  My suggestion is that you wait until your system is in 
> operation and then look first for general tuning help before you even 
> consider trying to impliment a memory-cached table in your application.
>
> Just for the record, I can think of at least one way of hacking this 
> on, but it seems like it should be an absolutely last resort rather 
> than a first impulse.
>
> PostgreSQL can do this, but you probably don't want it to.
>
> Best Wishes,
> Chris Travers



In response to

Responses

pgsql-admin by date

Next:From: Tsirkin EvgenyDate: 2005-07-20 07:55:50
Subject: Re: can not start the postgresql, i use gentoo
Previous:From: AndyDate: 2005-07-20 07:16:26
Subject: Re: can not start the postgresql, i use gentoo

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group