pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
caching complete table for optimizing search ?
3+ messages / 3 participants
[nested] [flat]

* caching complete table for optimizing search ?
@ 2004-10-27 16:57  Albrecht Berger <berger1517@gmx.ch>
  0 siblings, 0 replies; 3+ messages in thread

From: Albrecht Berger @ 2004-10-27 16:57 UTC (permalink / raw)
  To: pgsql-admin

Hello,

I'm running a search query on a table with approximately 120.000 rows
(3848 relpages, dbsize tablesize 30MB).

Because of poor performance I would like to cache the complete table in 
memory, but I'm not sure which config param I have to use to accomplish 
that.
The other tables in the db are rather small.

What configuration values are best for this kind of database ?

Postgres 8.0beta2 on a
RedHat-Linux with
Pentium Celeron 1500
256MB RAM


Thx
berger




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

* Re: caching complete table for optimizing search ?
@ 2004-10-27 20:17  Johnson, Heather <HJohnson@nypost.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Johnson, Heather @ 2004-10-27 20:17 UTC (permalink / raw)
  To: Albrecht Berger <berger1517@gmx.ch>; pgsql-admin-owner@postgresql.org; pgsql-admin

I'm not sure what to do to cache a single table, but we use a tool called memcached to accomplish what you are describing. Memcached will cache the db in RAM, allowing you to do all of your reads from memory. Writes are  more expensive, because you have to write to the db and to the cache, but if you have a db that it mostly getting selected against, and performance is a concern, this might be a good solution. You can get more info about memcached at: http://www.danga.com/memcached/.

Heather Johnson
Senior Database Programmer
New York Post

-----Original Message-----
From: pgsql-admin-owner@postgresql.org
To: pgsql-admin@postgresql.org
Sent: 10/27/2004 12:57 PM
Subject: [ADMIN] caching complete table for optimizing search ?

Hello,

I'm running a search query on a table with approximately 120.000 rows
(3848 relpages, dbsize tablesize 30MB).

Because of poor performance I would like to cache the complete table in 
memory, but I'm not sure which config param I have to use to accomplish 
that.
The other tables in the db are rather small.

What configuration values are best for this kind of database ?

Postgres 8.0beta2 on a
RedHat-Linux with
Pentium Celeron 1500
256MB RAM


Thx
berger


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@postgresql.org so that your
      message can get through to the mailing list cleanly

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

* Re: caching complete table for optimizing search ?
@ 2004-10-28 05:58  Jaime Casanova <systemguards@yahoo.com>
  parent: Johnson, Heather <HJohnson@nypost.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Jaime Casanova @ 2004-10-28 05:58 UTC (permalink / raw)
  To: pgsql-admin

> Hello,
> 
> I'm running a search query on a table with
> approximately 120.000 rows
> (3848 relpages, dbsize tablesize 30MB).
> 
> Because of poor performance I would like to cache
> the complete table in memory, but I'm not sure which
> config param I have
> to use to accomplish 
> that.
> The other tables in the db are rather small.

Maybe a redesign of the query is a better idea.
What about creating indexes?

If you provide info about the tables and the query
maybe we can help you.

Your table is very small (just 120.000 rows) but think
about cache a table of millions of rows thats not
optimus.


> 
> What configuration values are best for this kind of
> database ?
> 
> Postgres 8.0beta2 on a
> RedHat-Linux with
> Pentium Celeron 1500
> 256MB RAM
> 

There are some docs talking about modifiyng the
postgresql.conf, but i said info about your database,
your tables and data is needed.


Maybe the PERFORMANCE list is more adecuate.
> 
> Thx
> berger
> 
> 

you welcome.


regards,
Jaime Casanova

_________________________________________________________
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com



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


end of thread, other threads:[~2004-10-28 05:58 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-10-27 16:57 caching complete table for optimizing search ? Albrecht Berger <berger1517@gmx.ch>
2004-10-27 20:17 Re: caching complete table for optimizing search ? Johnson, Heather <HJohnson@nypost.com>
2004-10-28 05:58 ` Jaime Casanova <systemguards@yahoo.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