Group: pgsql.performance


Subject: Outer joins and Seq scans
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 10/28/2007 6:08:34 PM
Sami Dalouche <skoobi@free.fr> writes: > So, what could prevent postgrs from using the index ? You've carefully withheld all the details that might let us guess. If I had to guess anyway, I'd guess this is a pre-8.2 PG release that doesn't know how to rearrange outer joins, but there are any number of other possibilities. If you want useful help on a query planning issue, you generally need to provide - the exact Postgres version - full schema declaration of the relevant tables - exact queries tested - full EXPLAIN ANALYZE output With less info than that, people are just shooting in the dark. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Subject: Outer joins and Seq scans
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 10/28/2007 7:45:14 PM
Sami Dalouche <skoobi@free.fr> writes: > So, the version of postgres I use is : > samokk@samlaptop:~/Desktop $ dpkg -l | grep postgres > ii postgresql-8.2 8.2.5-1.1 OK. I think you have run afoul of a bug that was introduced in 8.2.5 that causes it not to realize that it can interchange the ordering of certain outer joins. Is there any chance you can apply the one-line patch shown here: http://archives.postgresql.org/pgsql-committers/2007-10/msg00374.php If rebuilding packages is not to your taste, possibly a down-rev to 8.2.4 would be the easiest solution. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org