Re: PostgreSQL OR performance - Mailing list pgsql-performance

From David Wilson
Subject Re: PostgreSQL OR performance
Date
Msg-id e7f9235d0811070207ka8baab0w5ffe6cfbb947b56b@mail.gmail.com
Whole thread Raw
In response to Re: PostgreSQL OR performance  ("Віталій Тимчишин" <tivv00@gmail.com>)
Responses Re: PostgreSQL OR performance  ("Віталій Тимчишин" <tivv00@gmail.com>)
List pgsql-performance
On Fri, Nov 7, 2008 at 4:14 AM, Віталій Тимчишин <tivv00@gmail.com> wrote:
> "Merge Join  (cost=518771.07..62884559.80 rows=1386158171 width=32) (actual
> time=30292.802..755751.242 rows=34749 loops=1)"

Have you tried increasing the default_statistics_target? The planner
is expecting 1.3 billion rows to be produced from a query that's only
actually producting 35k, which probably indicates some very bad
statistics. At the same time, the materialize step produces 242
million rows when the planner only expects to produce 2.3, indicating
a similar problem in the opposite direction. This probably means that
the planner is choosing plans that would be optimal if it was making
good guesses but are decidedly sub-optimal for your actual data.



--
- David T. Wilson
david.t.wilson@gmail.com

pgsql-performance by date:

Previous
From: "Віталій Тимчишин"
Date:
Subject: Re: PostgreSQL OR performance
Next
From: Richard Huxton
Date:
Subject: Re: PostgreSQL OR performance