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 17:53:48 |
Message-ID: | CACffM9F=VcvnV5+0KQTXrRmQ2Uwfx3R4Fdmd+EG2CQojcuR5RQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
And now, it runs, at least:
http://explain.depesz.com/s/GDJn
No one could send a guess on it?
2013/3/21 Daniel Cristian Cruz <danielcristian(at)gmail(dot)com>
> I've reduced default_statistics_target to 200, and saw less nested loops.
>
> I'm trying some changes to the query, but no better results.
>
> The table presenca has 26 million rows. The table aula_confirmacao has 840
> thousand rows.
>
>
> 2013/3/21 Daniel Cristian Cruz <danielcristian(at)gmail(dot)com>
>
>> 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
>> クルズ クリスチアン ダニエル
>>
>
>
>
> --
> Daniel Cristian Cruz
> クルズ クリスチアン ダニエル
>
--
Daniel Cristian Cruz
クルズ クリスチアン ダニエル
From | Date | Subject | |
---|---|---|---|
Next Message | Roberto Scattini | 2013-03-21 18:32:08 | streaming replication question |
Previous Message | Alban Hertroys | 2013-03-21 16:12:20 | Re: Problem in "Set search path" |