Re: Bad plan on a huge table query

From: Daniel Cristian Cruz <danielcristian(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Bad plan on a huge table query
Date: 2013-03-21 11:41:25
Message-ID: CACffM9HRdtL-fYLNkW_D6fQj9Dp9-SP7KB2Ba6Uq9VizcyC5PQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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:

http://explain.depesz.com/s/GRs

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

http://explain.depesz.com/s/fMY

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
クルズ クリスチアン ダニエル

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kalai R 2013-03-21 12:33:30 Problem in "Set search path"
Previous Message Craig Ringer 2013-03-21 05:42:55 Re: Trust intermediate CA for client certificates