From: Hiroshi Inoue <Inoue@tpf.co.jp>
To: Daniel Kalchev <daniel@digsys.bg>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: again on index usage
Date: Wed, 16 Jan 2002 05:50:04 +0900
Message-ID: <EKEJJICOHDIEMGPNIFIJEELLGHAA.Inoue@tpf.co.jp> (raw)
In-Reply-To: <EKEJJICOHDIEMGPNIFIJCELDGHAA.Inoue@tpf.co.jp>
> -----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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: Inoue@tpf.co.jp, daniel@digsys.bg, tgl@sss.pgh.pa.us
Subject: Re: again on index usage
In-Reply-To: <EKEJJICOHDIEMGPNIFIJEELLGHAA.Inoue@tpf.co.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox