Re: Preformance - Mailing list pgsql-general

From Tom Lane
Subject Re: Preformance
Date
Msg-id 18823.1012683439@sss.pgh.pa.us
Whole thread Raw
In response to Preformance  (Cees van de Griend <cees-list@griend.xs4all.nl>)
Responses Re: Preformance
List pgsql-general
Cees van de Griend <cees@griend.xs4all.nl> writes:
>> The problem is presumably that the planner is drastically
>> underestimating the number of joinable rows in "dn" in the
>> second case, and so choosing a plan that works well if that
>> number is small but not well when it's large.

> This is the strange part. The sizes of the 2 databases are not that
> great and the 'fast' one has a bigger Number table:

Nothing strange about that.  The larger table is probably enough
larger to persuade the planner to take the hash-join plan; remember
the problem in the other case is that the planner thinks there are few
enough rows to make nestloop appropriate, when there really are too
many for that plan to be a good choice.

> Someone has altered the table and added a column which is never used,
> there is no data in it and it is never used in a query.
> Can this be the reason for the huge preformance loss?

No.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: PostgreSQL transaction locking problem
Next
From: Cees van de Griend
Date:
Subject: Re: Preformance