Re: Temporary Table

Поиск
Список
Период
Сортировка
От Andrew McMillan
Тема Re: Temporary Table
Дата
Msg-id 1131417320.5555.10.camel@ubu.mcmillan.net.nz
обсуждение исходный текст
Ответ на Re: Temporary Table  ("Christian Paul B. Cosinas" <cpc@cybees.com>)
Список 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.
-------------------------------------------------------------------------


Вложения

В списке pgsql-performance по дате отправления:

Предыдущее
От: "Craig A. James"
Дата:
Сообщение: Expensive function and the optimizer
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Expensive function and the optimizer