pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Can Postgres cache a table in memory?
5+ messages / 5 participants
[nested] [flat]

* Can Postgres cache a table in memory?
@ 2002-10-03 14:03  Kevin Traub <ktraub@verizon.net>
  0 siblings, 4 replies; 5+ messages in thread

From: Kevin Traub @ 2002-10-03 14:03 UTC (permalink / raw)
  To: pgsql-sql

Hello all;

I'm trying to speed up a query which returns the majority of a table so and
index isn't helpful.
I've got more than enough RAM to hold my table so, can anyone tell me if
there is there a way to force Postgres to cache a table in RAM?

Any help would be appreciated.

Thanks;
-Kevin Traub





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Can Postgres cache a table in memory?
@ 2002-10-04 13:14  Achilleus Mantzios <achill@matrix.gatewaynet.com>
  parent: Kevin Traub <ktraub@verizon.net>
  3 siblings, 0 replies; 5+ messages in thread

From: Achilleus Mantzios @ 2002-10-04 13:14 UTC (permalink / raw)
  To: Kevin Traub <ktraub@verizon.net>; +Cc: pgsql-sql

On Thu, 3 Oct 2002, Kevin Traub wrote:

> Hello all;
>
> I'm trying to speed up a query which returns the majority of a table so and
> index isn't helpful.
> I've got more than enough RAM to hold my table so, can anyone tell me if
> there is there a way to force Postgres to cache a table in RAM?
>
> Any help would be appreciated.

You need to tune first of all shared_buffers.
Change the postgres.conf file usual in $PGDATA directory.
Bare in mind that one buffer holds 8k of data.


>
> Thanks;
> -Kevin Traub
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>

==================================================================
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel:    +30-10-8981112
fax:    +30-10-8981877
email:  achill@matrix.gatewaynet.com
        mantzios@softlab.ece.ntua.gr




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Can Postgres cache a table in memory?
@ 2002-10-04 13:35  Richard Huxton <dev@archonet.com>
  parent: Kevin Traub <ktraub@verizon.net>
  3 siblings, 0 replies; 5+ messages in thread

From: Richard Huxton @ 2002-10-04 13:35 UTC (permalink / raw)
  To: Kevin Traub <ktraub@verizon.net>; pgsql-sql

On Thursday 03 Oct 2002 3:03 pm, Kevin Traub wrote:
> Hello all;
>
> I'm trying to speed up a query which returns the majority of a table so and
> index isn't helpful.
> I've got more than enough RAM to hold my table so, can anyone tell me if
> there is there a way to force Postgres to cache a table in RAM?

You're probably just as well off if you let your OS deal with caching the 
underlying file. What figures are you getting (use the "free" command if in 
linux). It might be that you've given Postgresql *too* much memory, and 
that's interfering with your OS.

Could you provide brief hardware specs, the size of the table concerned, time 
taken?

-- 
  Richard Huxton



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Can Postgres cache a table in memory?
@ 2002-10-04 14:14  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Kevin Traub <ktraub@verizon.net>
  3 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2002-10-04 14:14 UTC (permalink / raw)
  To: Kevin Traub <ktraub@verizon.net>; +Cc: pgsql-sql

"Kevin Traub" <ktraub@verizon.net> writes:
> I'm trying to speed up a query which returns the majority of a table so and
> index isn't helpful.
> I've got more than enough RAM to hold my table so, can anyone tell me if
> there is there a way to force Postgres to cache a table in RAM?

There is no need to do anything; if you're hitting the table a lot, it
should all migrate into kernel disk buffers.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Can Postgres cache a table in memory?
@ 2002-10-04 15:34  Josh Berkus <josh@agliodbs.com>
  parent: Kevin Traub <ktraub@verizon.net>
  3 siblings, 0 replies; 5+ messages in thread

From: Josh Berkus @ 2002-10-04 15:34 UTC (permalink / raw)
  To: Kevin Traub <ktraub@verizon.net>; pgsql-sql

Kevin,

> I'm trying to speed up a query which returns the majority of a table
> so and
> index isn't helpful.
> I've got more than enough RAM to hold my table so, can anyone tell me
> if
> there is there a way to force Postgres to cache a table in RAM?

Please join the PGSQL-PERFORMANCE mailing list and post this question
there:

pgsql-performance-request@postgresql.org
message: "subscribe"

-Josh Berkus



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2002-10-04 15:34 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-10-03 14:03 Can Postgres cache a table in memory? Kevin Traub <ktraub@verizon.net>
2002-10-04 13:14 ` Achilleus Mantzios <achill@matrix.gatewaynet.com>
2002-10-04 13:35 ` Richard Huxton <dev@archonet.com>
2002-10-04 14:14 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-10-04 15:34 ` Josh Berkus <josh@agliodbs.com>

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