Statistics on a table

From: "Maksim Likharev" <mlikharev(at)aurigin(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Statistics on a table
Date: 2003-07-09 00:48:15
Message-ID: 56510AAEF435D240958D1CE8C6B1770A014A0DF3@mailc03.aurigin.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I just found very interesting situation,
statistic ( n_distinct in particular) records for one of my columns,
greatly under calculated it saying:

49726, but in reality 33409816.

So planer never choose index but rather using table scan, and query
never returns,
is it any way how I can improve that?

I can turn seqscan off but is it safe?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joseph Shraibman 2003-07-09 01:02:28 where is the list of companies that provide commercial support?
Previous Message Maksim Likharev 2003-07-08 23:03:11 Re: PG crash on simple query, story continues