Re: [PERFORM] How to calculate statistics for one column

2015-06-18 Thread Igor Neyman
From: Irineu Ruiz [mailto:iri...@rassystem.com.br] Sent: Thursday, June 18, 2015 3:10 PM To: Igor Neyman Cc: pgsql-performance@postgresql.org Subject: Re: [PERFORM] How to calculate statistics for one column I din't understood. In this case, my statistics target should be approximately 3

Re: [PERFORM] How to calculate statistics for one column

2015-06-18 Thread Irineu Ruiz
GMT-03:00 Igor Neyman : > > > > > *From:* Irineu Ruiz [mailto:iri...@rassystem.com.br] > *Sent:* Thursday, June 18, 2015 2:18 PM > *To:* Igor Neyman > *Cc:* pgsql-performance@postgresql.org > *Subject:* Re: [PERFORM] How to calculate statistics for one column > > &g

Re: [PERFORM] How to calculate statistics for one column

2015-06-18 Thread Igor Neyman
From: Irineu Ruiz [mailto:iri...@rassystem.com.br] Sent: Thursday, June 18, 2015 2:18 PM To: Igor Neyman Cc: pgsql-performance@postgresql.org Subject: Re: [PERFORM] How to calculate statistics for one column SELECT COUNT(DISTINCT id_camada) FROM … equals 349 And it doesn't change signific

Re: [PERFORM] How to calculate statistics for one column

2015-06-18 Thread Irineu Ruiz
half Of *Irineu Ruiz > *Sent:* Thursday, June 18, 2015 1:53 PM > *To:* pgsql-performance@postgresql.org > *Subject:* [PERFORM] How to calculate statistics for one column > > > > Hi, > > > > I have a table with irregular distribution based in a foreign key, like > you

Re: [PERFORM] How to calculate statistics for one column

2015-06-18 Thread Igor Neyman
From: pgsql-performance-ow...@postgresql.org [mailto:pgsql-performance-ow...@postgresql.org] On Behalf Of Irineu Ruiz Sent: Thursday, June 18, 2015 1:53 PM To: pgsql-performance@postgresql.org Subject: [PERFORM] How to calculate statistics for one column Hi, I have a table with irregular

[PERFORM] How to calculate statistics for one column

2015-06-18 Thread Irineu Ruiz
Hi, I have a table with irregular distribution based in a foreign key, like you can see in the end of the e-mail. Sometimes, in simples joins with another tables with the same id_camada (but not the table owner of the foreign key, the planner chooses a seq scan instead of use the index with id_ca