Re: again on index usage

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Daniel Kalchev" <daniel(at)digsys(dot)bg>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: again on index usage
Date: 2002-01-15 20:50:04
Message-ID: EKEJJICOHDIEMGPNIFIJEELLGHAA.Inoue@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> -----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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2002-01-15 21:24:31 Re: FATAL 1: Relation 'pg_shadow' does not exist
Previous Message Hiroshi Inoue 2002-01-15 20:49:50 Re: Theory about XLogFlush startup failures