From: | Andrew McMillan <andrew(at)catalyst(dot)net(dot)nz> |
---|---|
To: | "Christian Paul B(dot) Cosinas" <cpc(at)cybees(dot)com> |
Cc: | "'Joshua D(dot) Drake'" <jd(at)commandprompt(dot)com>, 'Alvaro Nunes Melo' <al_nunes(at)atua(dot)com(dot)br>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Temporary Table |
Date: | 2005-11-08 02:35:20 |
Message-ID: | 1131417320.5555.10.camel@ubu.mcmillan.net.nz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Tue, 2005-11-08 at 10:22 +0000, Christian Paul B. Cosinas wrote:
> I see.
>
> But How Can I put this in the Cron of my Linux Server?
> I really don't have an idea :)
> What I want to do is to loop around all the databases in my server and
> execute the vacuum of these 3 tables in each tables.
I usually write a small shell script something like:
==================================================
#!/bin/sh
psql somedatabase <<EOQ
VACUUM this;
VACUUM that;
DELETE FROM someotherplace WHERE delete_this_record;
EOQ
==================================================
and so forth...
This makes the SQL quite nicely readable.
Regards,
Andrew McMillan.
-------------------------------------------------------------------------
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)803-2201 MOB: +64(272)DEBIAN OFFICE: +64(4)499-2267
You work very hard. Don't try to think as well.
-------------------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-11-08 04:12:07 | Re: Expensive function and the optimizer |
Previous Message | Christopher Kings-Lynne | 2005-11-08 02:24:20 | Re: Temporary Table |