Re: Are statistics gathered on function indexes?

From: Curt Sampson <cjs(at)cynic(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Are statistics gathered on function indexes?
Date: 2002-06-28 09:49:39
Message-ID: Pine.NEB.4.43.0206281845210.6613-100000@angelic.cynic.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)cynic(dot)net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Simone Tellini 2002-06-28 09:54:07 ERROR: index_formtuple: data takes 40 bytes, max is 8191
Previous Message Peter B. 2002-06-28 09:30:58 Postgresql install on windows