From: Hiroshi Inoue <Inoue@tpf.co.jp>
To: Daniel Kalchev <daniel@digsys.bg>
Cc: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: again on index usage
Date: Thu, 17 Jan 2002 04:55:46 +0900
Message-ID: <EKEJJICOHDIEMGPNIFIJKEOGGHAA.Inoue@tpf.co.jp> (raw)
In-Reply-To: <200201161112.NAA07690@dcave.digsys.bg>
> -----Original Message-----
> From: Daniel Kalchev [mailto:daniel@digsys.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
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
Subject: Re: again on index usage
In-Reply-To: <EKEJJICOHDIEMGPNIFIJKEOGGHAA.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