X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id BC6219FA6B1 for ; Fri, 9 Jun 2006 06:52:46 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 09996-03 for ; Fri, 9 Jun 2006 06:52:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 1089F9FA5D2 for ; Fri, 9 Jun 2006 06:52:43 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id C9EF131DC6; Fri, 9 Jun 2006 11:52:41 +0200 (MET DST) From: "Andrus" X-Newsgroups: pgsql.performance Subject: Re: Why date index is not used Date: Fri, 9 Jun 2006 12:06:47 +0300 Organization: Hub.Org Networking Services Lines: 20 Message-ID: References: <44887875.8000502@fuzzy.cz> X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-RFC2646: Format=Flowed; Original To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/106 X-Sequence-Number: 19463 > Btw. have you run ANALYZE on the table recently? I have autovacuum with default statitics settings running so I expect that it is analyzed. > What is the number > of distinct values in the 'kuupaev' column? select count(distinct kuupaev) from makse returns 61 kuupaev is sales date. So this can contain 365 distinct values per year and max 10 year database, total can be 3650 distinct values after 10 years. Andrus