Le 16/03/2010 15:37, Tom Lane a écrit :
Arnaud Lesauvage<arnaud.listes@xxxxxxxxx> writes:
First query :
"Merge Join (cost=699826.38..704333.80 rows=13548 width=836)"
" Merge Cond: (((c.rue)::text = (r.rue)::text) AND ((c.codesite)::text
= (r.codesite)::text))"
Second query :
"Seq Scan on cellules c (cost=0.00..5018080.39 rows=552343 width=823)"
Please notice that the planner thinks the second plan is much more
expensive than the first. I think you will find that it's right.
Using an index is not always the best way to do a query.
Yes indeed, I should have read the output of explain more thoroughly I
guess !
I am still a bit intrigued by the different query plans. Both query look
very similar to me, so why does the planner make so different choices ?
Regards,
Arnaud
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general