André Volpato <andre.volpato@xxxxxxxxxxxxxxxxxxxxx> 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! ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your message can get through to the mailing list cleanly