Vacuum, slowqueries e tabe optimization

From: "Thiago Lima " <thiagolima(at)webforce(dot)com(dot)br>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Vacuum, slowqueries e tabe optimization
Date: 2003-03-18 16:58:40
Message-ID: 034c01c2ed6f$a32f6420$3700a8c0@medusa
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general



I have a database and I execute some complex queries that join 3
tables in the same query. Each one of this query was taking 48 seconds
to run. So reading the documentation I saw about vacuum command and
issued it on the tables.

Now select command with 3 joins are taking > 1second. I'm very
happy with it.

But I have some questions :

1) If I issue a explain select it return me this :

Hash Join (cost=283.89..336.61 rows=18 width=290)

what is this hash join? It wasn't there before the vaccum.

2) Should I issue a vaccum command every night to assure the
best performance?

3)There's anything in postgres like mysql's slowquerys.log, that
could log queries that are taking more than n seconds to run?

4)There's any documentation about what vacuum really does? In
the docs they don't explain it very well. Maybe some docs about how
postgresql stores the tables and how vacuum changes it.

5) If I issue vacuum analyze in a table that changes offen, it
will do any good? If I understood right it make some math in the table
and passes it to the query optimizer. But if the table changes offen
will that work?

Thanks Alot
Thiago Madeira de Lima.


Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-03-18 17:19:32 Re: Can I write Large Objects in parallel transactions?
Previous Message Bruce Momjian 2003-03-18 16:19:47 Re: Red Hat snubbed by Oracle