1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

R-tree is dead ... long live GiST.

This commit is contained in:
Tom Lane
2005-11-07 17:36:47 +00:00
parent 645adf5de8
commit 2a8d3d83ef
46 changed files with 213 additions and 2954 deletions

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/geo_selfuncs.c,v 1.24 2004/12/31 22:01:22 pgsql Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/geo_selfuncs.c,v 1.25 2005/11/07 17:36:45 tgl Exp $
*
* XXX These are totally bogus. Perhaps someone will make them do
* something reasonable, someday.
@ -22,19 +22,19 @@
/*
* Selectivity functions for rtrees. These are bogus -- unless we know
* the actual key distribution in the index, we can't make a good prediction
* of the selectivity of these operators.
* Selectivity functions for geometric operators. These are bogus -- unless
* we know the actual key distribution in the index, we can't make a good
* prediction of the selectivity of these operators.
*
* Note: the values used here may look unreasonably small. Perhaps they
* are. For now, we want to make sure that the optimizer will make use
* of an r-tree index if one is available, so the selectivity had better
* of a geometric index if one is available, so the selectivity had better
* be fairly small.
*
* In general, rtrees need to search multiple subtrees in order to guarantee
* In general, GiST needs to search multiple subtrees in order to guarantee
* that all occurrences of the same key have been found. Because of this,
* the estimated cost for scanning the index ought to be higher than the
* output selectivity would indicate. rtcostestimate(), over in selfuncs.c,
* output selectivity would indicate. gistcostestimate(), over in selfuncs.c,
* ought to be adjusted accordingly --- but until we can generate somewhat
* realistic numbers here, it hardly matters...
*/