Re: postgres FROM clause problem - Mailing list pgsql-general

From Tom Lane
Subject Re: postgres FROM clause problem
Date
Msg-id 6971.1078934086@sss.pgh.pa.us
Whole thread Raw
In response to postgres FROM clause problem  (Paolo Tavalazzi <ptavalazzi@charta.it>)
Responses Re: postgres FROM clause problem
List pgsql-general
Paolo Tavalazzi <ptavalazzi@charta.it> writes:
> I have two query that they are different only for order of the tables
> in FROM lclause , but give back different query plan :

Hm, seems like the planner is making wacko estimates in the second case.
You didn't say what data types are involved in this query --- are any of
the join columns int8 or float8 or timestamp?  If so you might be
getting bitten by the 7.4 pg_statistic alignment bug.  Please follow the
repair procedures suggested in the 7.4.2 release notes:
http://developer.postgresql.org/docs/postgres/release.html#RELEASE-7-4-2
and see if that improves matters.

            regards, tom lane

pgsql-general by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: Data Corruption in case of abrupt failure
Next
From: Bruno Wolff III
Date:
Subject: Re: Moving from 7.3.4 to 7.4.x?