From: Andrew McMillan <andrew@catalyst.net.nz>
To: Christian Paul B. Cosinas <cpc@cybees.com>
Cc: 'Joshua D. Drake' <jd@commandprompt.com>
Cc: Alvaro Nunes Melo <al_nunes@atua.com.br>
Cc: pgsql-performance@postgresql.org
Subject: Re: Temporary Table
Date: Tue, 08 Nov 2005 15:35:20 +1300
Message-ID: <1131417320.5555.10.camel@ubu.mcmillan.net.nz> (raw)
In-Reply-To: <008401c5e44e$42600c20$1e21100a@ghwk02002147>
References: <008401c5e44e$42600c20$1e21100a@ghwk02002147>
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.
-------------------------------------------------------------------------
Attachments:
signature.asc (application/pgp-signature, 188B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: andrew@catalyst.net.nz, cpc@cybees.com, jd@commandprompt.com, al_nunes@atua.com.br
Subject: Re: Temporary Table
In-Reply-To: <1131417320.5555.10.camel@ubu.mcmillan.net.nz>
References: <008401c5e44e$42600c20$1e21100a@ghwk02002147> <1131417320.5555.10.camel@ubu.mcmillan.net.nz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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