Re: [HACKERS] Postgres Performance

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Edwin Ramirez <ramirez(at)doc(dot)mssm(dot)edu>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Postgres Performance
Date: 1999-09-03 16:08:49
Message-ID: 37CFF291.3B2FBBD2@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I have a couple of large(?) tables which I would like to keep them in
> memory (cached) so that searches are performed as fast as possible.
> Is it possible to 'pin' the tables and it's indexes in memory?

Not explicitly. We rely on the OS to do that.

> Are there any other options/values which would yield better performance?

By default, the backend "fsyncs" for every query. You can disable
this, which would then allow the tables to hang around in memory until
the OS decides to flush to disk. Not everyone should do this, since
there is a (small) risk that if your computer crashes after some
updates but before things are flushed then the db might become
inconsistant. afaik we have never had an unambiguous report that this
has actually happened (but others might remember differently). There
is already that risk to some extent, but instead of the window being
O(1sec) it becomes O(30sec).

Run the backend by adding '-o -F' (or just '-F' to your existing list
of "-o" options).

- Thomas

--
Thomas Lockhart lockhart(at)alumni(dot)caltech(dot)edu
South Pasadena, California

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-09-03 16:09:21 Re: [HACKERS] Postgres Performance
Previous Message Tom Lane 1999-09-03 15:48:06 Re: [HACKERS] main tree is (slightly) damaged