aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gist.c
diff options
context:
space:
mode:
authorTeodor Sigaev <teodor@sigaev.ru>2006-05-29 12:50:06 +0000
committerTeodor Sigaev <teodor@sigaev.ru>2006-05-29 12:50:06 +0000
commitb32000eda4c4193d60af1b5a5bb3c0c6dd4d7194 (patch)
treece5b16839a5e54c3b44056e4ed16837746bd298d /src/backend/access/gist/gist.c
parent0a6fde5a266dbfdd3d522b707290e1d744a8e494 (diff)
downloadpostgresql-b32000eda4c4193d60af1b5a5bb3c0c6dd4d7194.tar.gz
postgresql-b32000eda4c4193d60af1b5a5bb3c0c6dd4d7194.zip
Som improve page split in multicolumn GiST index.
If user picksplit on n-th column generate equals left and right unions then it calls picksplit on n+1-th column.
Diffstat (limited to 'src/backend/access/gist/gist.c')
-rw-r--r--src/backend/access/gist/gist.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index 54ac45ee2fe..326e87e7889 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/gist/gist.c,v 1.137 2006/05/24 11:01:39 teodor Exp $
+ * $PostgreSQL: pgsql/src/backend/access/gist/gist.c,v 1.138 2006/05/29 12:50:06 teodor Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1033,7 +1033,13 @@ gistSplitByKey(Relation r, Page page, IndexTuple *itup, int len, GISTSTATE *gist
/*
* all keys are not-null
*/
- gistUserPicksplit(r, entryvec, attno, v, itup, len, giststate);
+ if ( gistUserPicksplit(r, entryvec, attno, v, itup, len, giststate) && attno+1 != r->rd_att->natts )
+ /*
+ * Splitting on attno column is not optimized: unions of left and right
+ * page are the same, we will try to split page by
+ * following columns
+ */
+ gistSplitByKey(r, page, itup, len, giststate, v, entryvec, attno+1);
}
}