Re: Postgres performance comments from a MySQL user

From: Ernest E Vogelsinger <ernest(at)vogelsinger(dot)at>
To: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
Cc: Justin Clift <justin(at)postgresql(dot)org>, Joseph Shraibman <jks(at)selectacast(dot)net>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgres performance comments from a MySQL user
Date: 2003-06-13 21:04:44
Message-ID: 5.1.1.6.2.20030613225518.03c04618@mail.vogelsinger.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 22:10 13.06.2003, scott.marlowe said:
--------------------[snip]--------------------
>Good idea. Don't forget to make sure it sets effective_cache_size while
>we're at it. Just add up the kernel cache size and the free memory on a
>machine to get an approximation.
--------------------[snip]--------------------

Scott - while we're at it, a quick question.

On that machine, cat /proc/meminfo reports "Cached: 1740844 kB" (which is
approx. 1.6GB cache), the machine has 1GB memory installed. So I did what
you suggested before:
# 1.6GB ~= 200000 pages at 8k
effective_cache_size = 200000

I have a query that runs for 17secs for the first time. Now, when executed
a second time, it consumes 270 msec. From the third execution it's running
with 29 msec.

However this only holds for the open connection. When connecting anew, it
starts with 270 msec and drops to 29 msec again.

Any clues about this interesting behaviour?

--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Maksim Likharev 2003-06-13 21:05:38 Re: return records in DB load order??
Previous Message Thomas Kellerer 2003-06-13 21:03:17 Re: using sequences