pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: scott.marlowe <scott.marlowe@ihs.com>
To: Wei Weng <wweng@kencast.com>
Cc: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Cc: Chris Faulkner <chrisf@oramap.com>
Cc: Pgsql-Performance <pgsql-performance@postgresql.org>
Cc: Pgsql-Sql <pgsql-sql@postgresql.org>
Subject: Re: [SQL] sql performance and cache
Date: Tue, 14 Oct 2003 11:26:45 -0600 (MDT)
Message-ID: <Pine.LNX.4.33.0310141125240.2514-100000@css120.ihs.com> (raw)
In-Reply-To: <Pine.LNX.4.56.0310141247370.7836@localhost.localdomain>

On Tue, 14 Oct 2003, Wei Weng wrote:

> On Sat, 11 Oct 2003, Christopher Kings-Lynne wrote:
> 
> > 
> > > I have two very similar queries which I need to execute. They both have
> > > exactly the same from / where conditions. When I execute the first, it takes
> > > about 16 seconds. The second is executed almost immediately after, it takes
> > > 13 seconds. In short, I'd like to know why the query result isn't being
> > > cached and any ideas on how to improve the execution.
> > 
> > <snip>
> > 
> > > OK - so I could execute the query once, and get the maximum size of the
> > > array and the result set in one. I know what I am doing is less than optimal
> > > but I had expected the query results to be cached. So the second execution
> > > would be very quick. So why aren't they ? I have increased my cache size -
> > > shared_buffers is 2000 and I have doubled the default max_fsm... settings
> > > (although I am not sure what they do). sort_mem is 8192.
> > 
> > PostgreSQL does not have, and has never had a query cache - so nothing 
> > you do is going to make that second query faster.
> > 
> > Perhaps you are confusing it with the MySQL query cache?
> > 
> > Chris
> > 
> Is there plan on developing one (query cache)?

Not really, Postgresql's design makes it a bit of a non-winner.




view thread (14+ messages)  latest in thread

Message-ID: <Pine.LNX.4.33.0310141125240.2514-100000@css120.ihs.com>
Permalink:  ../Pine.LNX.4.33.0310141125240.2514-100000@css120.ihs.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.33.0310141125240.2514-100000@css120.ihs.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: scott.marlowe@ihs.com, wweng@kencast.com, chriskl@familyhealth.com.au, chrisf@oramap.com, pgsql-performance@postgresql.org
  Subject: Re: [SQL] sql performance and cache
  In-Reply-To: <Pine.LNX.4.33.0310141125240.2514-100000@css120.ihs.com>

* 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