Re: Are statistics gathered on function indexes? - Mailing list pgsql-admin

From Curt Sampson
Subject Re: Are statistics gathered on function indexes?
Date
Msg-id Pine.NEB.4.43.0206281845210.6613-100000@angelic.cynic.net
Whole thread Raw
In response to Re: Are statistics gathered on function indexes?  (Ray Ontko <rayo@ontko.com>)
List pgsql-admin
The vast majority of the cost of using an index is due to reading
the data blocks in the table in a random order, rathern than
sequentially, right? Rather than making estimates of the selectivity
of an index when you search for 'W%', why not actually start the
index lookup and count how many you get? If you know you want to
do a table scan if you have more than, say, 500 rows that match
'W%', you'd only have to read a few index pages to determine whether
or not there are more than 500 rows, right?

Or am I on crack here?

cjs
--
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.netbsd.org
    Don't you know, in this new Dark Age, we're all light.  --XTC




pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Are statistics gathered on function indexes?
Next
From: Simone Tellini
Date:
Subject: ERROR: index_formtuple: data takes 40 bytes, max is 8191