Re: Bad plan on a huge table query - Mailing list pgsql-general

From Daniel Cristian Cruz
Subject Re: Bad plan on a huge table query
Date
Msg-id CACffM9HRdtL-fYLNkW_D6fQj9Dp9-SP7KB2Ba6Uq9VizcyC5PQ@mail.gmail.com
Whole thread Raw
Responses Re: Bad plan on a huge table query
List pgsql-general
Hi,

I'm trying to figure out why does the planner found 1 row estimate using nested loops over a big table. There is no return from it:


It returns if disable nested loops, but the plan still poor:


I'm using PostgreSQL 9.2.3, default_statistics_target on 1000.

I can't remember what to make PostgreSQL sees a better estimate in the scan of aula_confirmacao and the join with presenca. I got rusty after a long time just doing modeling.

Does someone has some idea on that?

Thanks,
--
Daniel Cristian Cruz
クルズ クリスチアン ダニエル

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: [HACKERS] Trust intermediate CA for client certificates
Next
From: Kalai R
Date:
Subject: Problem in "Set search path"