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 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tsirkin Evgeny | 2005-07-20 07:55:50 | Re: can not start the postgresql, i use gentoo |
Previous Message | Andy | 2005-07-20 07:16:26 | Re: can not start the postgresql, i use gentoo |