pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tsirkin Evgeny <tsurkin@mail.jct.ac.il>
To: Chris Travers <chris@verkiel.metatrontech.com>
Cc: Tsirkin Evgeny <tsurkin@jct.ac.il>
Cc: pgsql-admin@postgresql.org
Subject: Re: caching table/query
Date: Wed, 20 Jul 2005 10:25:59 +0300
Message-ID: <42DDFC87.1000807@mail.jct.ac.il> (raw)
In-Reply-To: <42DDEC2C.9050009@metatrontech.com>
References: <42DA3A4C.3080009@mail.jct.ac.il>
	<20050717140655.GA9637@winnie.fuhr.org>
	<42DA7226.5070808@mail.jct.ac.il>
	<28088.1121615607@sss.pgh.pa.us>
	<42DB4DE2.6090304@mail.jct.ac.il>
	<42DDEC2C.9050009@metatrontech.com>


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





view thread (9+ messages)  latest in thread

Message-ID: <42DDFC87.1000807@mail.jct.ac.il>
Permalink:  ../42DDFC87.1000807@mail.jct.ac.il/
Also on:    postgresql.org/message-id/42DDFC87.1000807@mail.jct.ac.il

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tsurkin@mail.jct.ac.il, chris@verkiel.metatrontech.com, tsurkin@jct.ac.il
  Subject: Re: caching table/query
  In-Reply-To: <42DDFC87.1000807@mail.jct.ac.il>
  References: <42DA3A4C.3080009@mail.jct.ac.il> <20050717140655.GA9637@winnie.fuhr.org> <42DA7226.5070808@mail.jct.ac.il> <28088.1121615607@sss.pgh.pa.us> <42DB4DE2.6090304@mail.jct.ac.il> <42DDEC2C.9050009@metatrontech.com> <42DDFC87.1000807@mail.jct.ac.il>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox