Re: Postgres performace with large tables.

From: Andrew McMillan <andrew(at)catalyst(dot)net(dot)nz>
To: Wim <wdh(at)belbone(dot)be>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Postgres performace with large tables.
Date: 2003-02-06 08:11:34
Message-ID: 1044519094.2942.4.camel@kant.mcmillan.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Thu, 2003-02-06 at 20:39, Wim wrote:
> Andrew McMillan wrote:
> >
> >If you have processes that are updating/deleting within the table in
> >parallel then you probably want to vacuum the table (much) more often.
> >
> I Think I'll try that in the first place,
> I do:
> BEGIN
> SELECT routers FROM routers_table WHERE blabla;
> UPDATE routers_table SET timestamp=blabla;
> INSERT INTO routers_counters VALUES blablabla;
> END
> COMMIT
>
> How much should I vacuum the table? After every run of the script or 2
> or 3 times/day?

I would tend to "VACUUM routers_table" after each run of the script,
given that it is a small table (presumably 30 rows) it should be next to
know overhead and will ensure it remains within 1-2 physical pages.

If you continue to experience problems, you are best advised to provide
full schema and EXPLAIN output along with your questions.

Cheers,
Andrew.
--
---------------------------------------------------------------------
Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington
WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267
Survey for nothing with http://survey.net.nz/
---------------------------------------------------------------------

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Aarni Ruuhimäki 2003-02-06 08:47:34 Re: how can I tell it's postgresql data?
Previous Message Wim 2003-02-06 07:39:12 Re: Postgres performace with large tables.