Received: from p2272.nsk.ne.jp (p2272.nsk.ne.jp [210.145.18.145]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0FKoWV37242 for ; Tue, 15 Jan 2002 15:50:32 -0500 (EST) (envelope-from Inoue@tpf.co.jp) Received: from mcadnote1 (ppm113.noc.fukui.nsk.ne.jp [61.198.95.13]) by p2272.nsk.ne.jp (8.9.3/3.7W-20000722) with SMTP id FAA20081; Wed, 16 Jan 2002 05:50:04 +0900 (JST) From: "Hiroshi Inoue" To: "Daniel Kalchev" , "Tom Lane" Cc: Subject: Re: again on index usage Date: Wed, 16 Jan 2002 05:50:04 +0900 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Importance: Normal X-Archive-Number: 200201/629 X-Sequence-Number: 17647 > -----Original Message----- > From: Hiroshi Inoue > > > -----Original Message----- > > From: Daniel Kalchev > > > > I tried this: > > > > db=# explain > > db-# SELECT sum(input), sum(output) FROM iplog_test > > > db-# WHERE > > db-# '2001-12-01 00:00:00+02' <= ipdate AND ipdate < '2001-12-02 > > 00:00:00+02' > > Is there only one ipdate value which satisfies the above where clause ? If '2001-12-01 00:00:00+02' is the unique ipdate value which satsifies '2001-12-01 00:00:00+02' <= ipdate AND ipdate < '2001-12-02 00:00:00+02' and CREATE INDEX preserves the physical order of the same key, the IndexScan would see physically ordered tuples. There's no strangeness even if the scan is faster than sequential scan. regards, Hiroshi Inoue