head	1.5;
access;
symbols
	REL7_4_29:1.2
	REL8_0_25:1.3
	REL7_4_28:1.2
	REL8_0_24:1.3
	REL7_4_27:1.2
	REL8_0_23:1.3
	REL7_4_26:1.2
	REL8_0_22:1.3
	REL7_4_25:1.2
	REL8_0_21:1.3
	REL7_4_24:1.2
	REL8_0_20:1.3
	REL7_4_23:1.2
	REL8_0_19:1.3
	REL7_4_22:1.2
	REL8_0_18:1.3
	REL7_4_21:1.2
	REL8_0_17:1.3
	REL7_4_20:1.2
	REL8_0_16:1.3
	REL7_3_21:1.2
	REL7_4_19:1.2
	REL8_0_15:1.3
	REL7_3_20:1.2
	REL7_4_18:1.2
	REL8_0_14:1.3
	REL7_3_19:1.2
	REL7_4_17:1.2
	REL8_0_13:1.3
	REL8_0_12:1.3
	REL7_3_18:1.2
	REL7_4_16:1.2
	REL8_0_11:1.3
	REL8_0_10:1.3
	REL7_4_15:1.2
	REL7_3_17:1.2
	REL8_0_9:1.3
	REL7_4_14:1.2
	REL7_3_16:1.2
	REL7_3_15:1.2
	REL7_4_13:1.2
	REL8_0_8:1.3
	REL7_3_14:1.2
	REL7_4_12:1.2
	REL8_0_7:1.3
	REL7_3_13:1.2
	REL7_4_11:1.2
	REL8_0_6:1.3
	REL7_3_12:1.2
	REL7_4_10:1.2
	REL8_0_5:1.3
	REL7_3_11:1.2
	REL7_4_9:1.2
	REL8_0_4:1.3
	REL7_2_8:1.2
	REL7_3_10:1.2
	REL7_4_8:1.2
	REL8_0_3:1.3
	REL8_0_2:1.3
	REL7_2_7:1.2
	REL7_3_9:1.2
	REL7_4_7:1.2
	REL8_0_1:1.3
	REL8_0_STABLE:1.3.0.4
	REL8_0_0:1.3.0.2
	REL8_0_0RC5:1.3
	REL8_0_0RC4:1.3
	REL8_0_0RC3:1.3
	REL8_0_0RC2:1.3
	REL8_0_0RC1:1.3
	REL8_0_0BETA5:1.3
	REL8_0_0BETA4:1.2
	REL7_4_6:1.2
	REL7_3_8:1.2
	REL7_2_6:1.2
	REL8_0_0BETA3:1.2
	REL8_0_0BETA2:1.2
	REL7_2_5:1.2
	REL7_4_5:1.2
	REL7_3_7:1.2
	REL7_4_4:1.2
	REL8_0_0BETA1:1.2
	REL7_4_3:1.2
	REL7_4_2:1.2
	REL7_3_6:1.2
	REL7_4_1:1.2
	REL7_3_5:1.2
	REL7_4:1.2
	REL7_4_RC2:1.2
	REL7_4_STABLE:1.2.0.8
	REL7_4_RC1:1.2
	REL7_4_BETA5:1.2
	REL7_4_BETA4:1.2
	REL7_4_BETA3:1.2
	REL7_4_BETA2:1.2
	WIN32_DEV:1.2.0.6
	REL7_4_BETA1:1.2
	REL7_3_4:1.2
	REL7_3_2:1.2
	REL7_2_4:1.2
	REL7_3_STABLE:1.2.0.4
	REL7_2_3:1.2
	REL7_2_STABLE:1.2.0.2
	REL7_2:1.2
	REL7_2_RC2:1.2
	REL7_2_RC1:1.2
	REL7_2_BETA5:1.2
	REL7_2_BETA4:1.2
	REL7_2_BETA3:1.1
	REL7_2_BETA2:1.1
	REL7_2_BETA1:1.1;
locks; strict;
comment	@# @;


1.5
date	2005.07.01.19.23.05;	author tgl;	state dead;
branches;
next	1.4;

1.4
date	2005.05.12.00.39.37;	author neilc;	state Exp;
branches;
next	1.3;

1.3
date	2004.11.01.11.11.13;	author neilc;	state Exp;
branches;
next	1.2;

1.2
date	2001.12.05.18.25.28;	author momjian;	state Exp;
branches;
next	1.1;

1.1
date	2001.05.31.18.27.18;	author tgl;	state Exp;
branches;
next	;


desc
@@


1.5
log
@Remove contrib version of rtree_gist --- now in core system.
@
text
@This is a R-Tree implementation using GiST.
Code (for PG95) are taken from http://s2k-ftp.cs.berkeley.edu:8000/gist/pggist/
and changed according to new version of GiST (7.1 and above)

All work was done by Teodor Sigaev (teodor@@stack.net) and Oleg Bartunov
(oleg@@sai.msu.su). See http://www.sai.msu.su/~megera/postgres/gist
for additional information.

CHANGES:
     Oct 10 MSD 2001

     1. Implemented new linear algorithm for picksplit
         ref. ( 'New Linear Node Splitting Algorithm for R-tree',
               C.H.Ang and T.C.Tan )

     Tue May 29 17:04:16 MSD 2001
     
     1. Small fixes in polygon code
        Thanks to Dave Blasby <dblasby@@refractions.net>

     Mon May 28 19:42:14 MSD 2001

     1. Full implementation of R-tree using GiST - gist_box_ops,gist_poly_ops
     2. gist_poly_ops is lossy
     3. NULLs support
     4. works with multi-key GiST

NOTICE:
     This version will only work with PostgreSQL version 7.1 and above
     because of changes in the function call interface.

INSTALLATION:

  gmake
  gmake install
  -- load functions
  psql <database> < rtree_gist.sql

REGRESSION TEST:

   gmake installcheck

EXAMPLE USAGE:

   create table boxtmp (b box);
   -- create index
   create index bix on boxtmp using gist (b gist_box_ops);
   -- query
   select * from boxtmp where b && '(1000,1000,0,0)'::box;


BENCHMARKS:

 subdirectory bench contains benchmark suite.
 Prerequisities: perl, DBI, DBD:Pg, Time::HiRes

  cd ./bench
  1. createdb TEST
  2. psql TEST < ../rtree_gist.sql
  3. ./create_test.pl | psql TEST 
     -- change $NUM - number of rows in test dataset
  4. ./bench.pl - perl script to benchmark queries. 
                  Run script without arguments to see available options.

     a)test without GiST index, using built-in R-Tree
       ./bench.pl -d TEST 
     b)test R-Tree using GiST index
       ./bench.pl -d TEST -g 


RESULTS:

1. One interesting thing is that insertion time for built-in R-Tree is 
   about 8 times more than ones for GiST implementation of R-Tree !!!
2. Postmaster requires much more memory for built-in R-Tree
3. Search time depends on dataset. In our case we got:
        +------------+-----------+--------------+
        |Number boxes|R-tree, sec|R-tree using  |
        |            |           |   GiST, sec  |
        +------------+-----------+--------------+
        |          10|      0.002|         0.002|
        +------------+-----------+--------------+
        |         100|      0.002|         0.002|
        +------------+-----------+--------------+
        |        1000|      0.002|         0.002|
        +------------+-----------+--------------+
        |       10000|      0.015|         0.025|
        +------------+-----------+--------------+
        |       20000|      0.029|         0.048|
        +------------+-----------+--------------+
        |       40000|      0.055|         0.092|
        +------------+-----------+--------------+
        |       80000|      0.113|         0.178|
        +------------+-----------+--------------+
        |      160000|      0.338|         0.337|
        +------------+-----------+--------------+
        |      320000|      0.674|         0.673|
        +------------+-----------+--------------+
@


1.4
log
@This patch makes some minor style cleanups to contrib/btree_gist: remove
the "extern" keyword from function definitions, reorganize some
PG_GETARG_XXX() usage, and similar.
@
text
@@


1.3
log
@Trivial fixes for English grammar in contrib/btree_gist and contrib/rtree_gist
documentation.
@
text
@d59 1
a59 1
  2. psql TEST < ../box.sql
@


1.2
log
@We forgot to mention in README.rtree_gist we implemented new
picksplit algorithm for Rtree. Please apply patch below to CVS

Oleg Bartunov
@
text
@d1 1
a1 1
This is R-Tree implementation using GiST.
d27 1
a27 1
     
d29 2
a30 2
     This version will works only with postgresql version 7.1 and above
     because of changes in interface of function calling.
@


1.1
log
@Support for emulating RTREE indexing in GiST.  Contributed by
Oleg Bartunov and Teodor Sigaev.
@
text
@d10 6
@
