Re: again on index usage

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Daniel Kalchev" <daniel(at)digsys(dot)bg>
Cc: "pgsql-hackers" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: again on index usage
Date: 2002-01-16 19:55:46
Message-ID: EKEJJICOHDIEMGPNIFIJKEOGGHAA.Inoue@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> -----Original Message-----
> From: Daniel Kalchev [mailto:daniel(at)digsys(dot)bg]
>
> Well, we already played around this by first creating new table
> ordered by
> random().

This seem to have little meaing if there's only one ipdate value
which satisfies the WHERE clause and the index order matches
the physical order of heap tuples.

I tried a very simple test case.
I have a table which has 100000 tuples and made a index on a
column whose value is always ''(i.e the same value).
Different from my expectation CREATE INDEX doesn't seem to
preserve the physical(input) order. However it seems sufficiently
ordered and probably we could expect the scan using the index
is as fast as sequential scan.

The result(distribution of corrsponding CTIDs) is as follows.

(3448, 17)
(3542, 26) -- (5172, 24) consecutive 94539 tuples
(3542, 25) -- (3448, 18) consecutive 5460 tuples

regards,
Hiroshi Inoue

Browse pgsql-hackers by date

  From Date Subject
Next Message Kovacs Zoltan 2002-01-16 20:00:54 Re: backend/po, make update-po works strange
Previous Message rbt 2002-01-16 19:26:51 Error in 7.2