From: | Gregory Stark <stark(at)enterprisedb(dot)com> |
---|---|
To: | André Volpato <andre(dot)volpato(at)ecomtecnologia(dot)com(dot)br> |
Cc: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "PostgreSQL" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Hash join in 8.3 |
Date: | 2007-12-13 22:20:10 |
Message-ID: | 878x3ynso5.fsf@oxford.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
André Volpato <andre(dot)volpato(at)ecomtecnologia(dot)com(dot)br> writes:
> I think I found the answer!<br>
> <br>
> 8.1: likes nested loop even after vacuumdb on the database.<br>
> <br>
> 8.3: likes hash at first time but:<br>
> - after vacuumdb *on the database* (I was running on the tables.....),
> it turns out to:<br>
> Merge Join (cost=178779.93..328503.44 rows=30000 width=38) in
> 20005.207 ms<br>
> #set enable_mergejoin=off;<br>
> Hash Join (cost=156644.00..365204.03 rows=30000 width=38) in
> 29104.390 ms<br>
> * a very faster hash here, seqscanning the smaller table before the
> bigger one. Tricky!<br>
> <br>
> I wont trust table vacuums anymore...<br>
> <br>
> <pre class="moz-signature" cols="72">--
HTML-only mail isn't looked upon too favourably here.
You keep saying "vacuum" which makes me think maybe you're not actually
analyzing your tables at all. "vacuum" doesn't analyze the tables, you have to
run "analyze" (or "vacuum analyze") for that.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's 24x7 Postgres support!
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2007-12-13 22:26:37 | Re: COPY speedup |
Previous Message | Tom Lane | 2007-12-13 22:17:37 | Re: extend "group by" to include "empty relations" ? |