Re: Temporary Table - Mailing list pgsql-performance

From Andrew McMillan
Subject Re: Temporary Table
Date
Msg-id 1131417320.5555.10.camel@ubu.mcmillan.net.nz
Whole thread Raw
In response to Re: Temporary Table  ("Christian Paul B. Cosinas" <cpc@cybees.com>)
List 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.
-------------------------------------------------------------------------


Attachment

pgsql-performance by date:

Previous
From: "Craig A. James"
Date:
Subject: Expensive function and the optimizer
Next
From: Tom Lane
Date:
Subject: Re: Expensive function and the optimizer