Re: again on index usage - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject Re: again on index usage
Date
Msg-id EKEJJICOHDIEMGPNIFIJEELLGHAA.Inoue@tpf.co.jp
Whole thread Raw
In response to Re: again on index usage  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List 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 


pgsql-hackers by date:

Previous
From: "Hiroshi Inoue"
Date:
Subject: Re: Theory about XLogFlush startup failures
Next
From: Jan Wieck
Date:
Subject: Re: FATAL 1: Relation 'pg_shadow' does not exist