Commands

anlinfo analysis
print information about analysis (which parts have been completed)

Example:
libgist> anlinfo a1

check index
Verify integrity of index (calls gist::check()).

Example:
libgist> check t

close index
Close index and deallocate associated resources (calls gist::close()).

Example:
libgist> close t

closeanl analysis
Writes back analysis and deallocates it from memory.

Example: libgist> closeanl a1

create index extension data-file fill-factor
Creates new index with given extension and bulk-loads it with the data file. The pages are filled according to the specified fill factor.

Example: libgist> create t rstar_point_ext point-data 0.8
which creates a point R*-tree named "t" and bulk-loads it with the data contained in file "point-data". The pages are filled up 80%.

Data files contain one item per line in the following format:
"key" "data"

create index extension
Creates empty index with given extension.

Example:
libgist> create t rstar_point_ext

createanl analysis index scriptfile #random target-util
Creates analysis for given index, runs queries in script file and saves analysis to file. The number of random runs and the target page utilization are stored for future use.

Example:
libgist> createanl a1 t query-script 10 0.8

delete index "qualification"
Removes items from index that match qualification (calls gist::remove()).

Example:
libgist> remove t "< p 50 50"

dump index [pgno]
Dump contents of page to cout. If no page number is specified, dump contents of entire index. Calls gist_ext_t::printPred().

Example:
libgist> dump t 2

help
Print command and extension information.

insert index "key" "data"
Insert new item into index.

Example:
libgist> insert t "25.003 24" "51234" which inserts a new item into a tree that stores 2-dimensional point data as keys and integers as data.

open index
Open index (calls gist::open())).

Example:
libgist> open t

openanl analysis
Reads analysis data from file into memory.

Example:
libgist> openanl a1

penaltystats analysis loadfile [opt|act=default]
Compute penalty statistics for analysis, using the items in load file for sample insertions. If opt is specified, the statistics will be computed for the tree derived from the optimal clustering, not the actual tree.

Example:
libgist> penaltystats a1

quit
Quit gistcmdline.

select index [k] [io(limit)] "qualification"
Run query and display matching items and data. If specified, k limits the number of items that are returned and limit limits the number of page accesses that are performed.

Example:
libgist> select t 20 "~ p 50 50", which runs a nearest-neighbor query on index t and stops returning items after the first 20 matches.

set echo (0|1)
Turn command echoing off or on. If turned off, query results are not displayed (helpful for creating analyses).

Example:
libgist> set echo 0

splitstats analysis [opt|act=default]
Compute split statistics for every leaf of given index. If opt is specified, the statistics will be computed for the tree derived from the optimal clustering, not the actual tree.

Example:
libgist> splitstats a1

wkldstats analysis
Compute execution statistics for every query of the analysis workload (in createanl, a script is supplied that contains the workload queries).

Example:
libgist> wkldstats a1

write loadfile index filename
Write out load file that, when used for bulk-loading (fill factor: 1.0), creates an index with an identical leaf level as the given one.

Example:
libgist> write loadfile t t-loadfile

Extensions

Extension Type Operators Keys
rt_point_ext R-tree spatial points
rt_rect_ext R-tree spatial rectangles
rstar_point_ext R*-tree spatial points
rstar_rect_ext R*-tree spatial rectangles
ss_point_ext SS-tree spatial points
sr_point_ext SR-tree spatial points
sp_point_ext Sphere-tree spatial points
bt_int_ext B-tree B-tree integers
bt_str_ext B-tree B-tree strings
All extensions presently store integers as data (the component after the key in the insert command).

Spatial Extensions

The following spatial query operators are supported:
Operators Description Example
= [p|r] key equality with point (p) or rectangle (r) "= p 5.5 6.5"
& [p|r] key overlap "& r 0 10 0 10"
< [p|r] key containment (key contains index data item) "< r 0 10 0 10"
> [p|r] key containment (index data item contains key) "> p 5.5 6.5"
~ p key nearest-neighbor query "~ p 5.5 6.5"

Point keys are specified as "x y ...", rectangle keys as "xmin xmax ymin ymax ...".

The implementation details of the various tree structures are described in their respective publications:

R-trees
A. Guttman, ``R-trees: A Dynamic Index Structure for Spatial Searching,'' Proc. 1984 ACM SIGMOD Conf. on Management of Data, Boston, MA, June 1984, 47-57.
R*-trees
N. Beckmann, H.-P. Kriegel, R. Schneider and B. Seeger, ``The R*-tree: An Efficient and Robust Access Method for Points and Rectangles,'' Proc. 1990 ACM SIGMOD Conf. on Management of Data, Atlantic City, NJ, May 1990, 322-331.
SS-trees
D. A. White and R. Jain, ``Similarity Indexing with the SS-tree,'' Proc. 12th Int'l Conf. on Data Engineering, New Orleans, LA, Feb. 1996, 516-523.
SR-trees
N. Katayama and S. Satoh, ``The SR-tree: An Index Structure for High-Dimensional Nearest Neighbor Queries,'' Proc. 1997 ACM SIGMOD Conf. on Management of Data, Tucson, AZ, May 1997, 369-380.
Sphere-trees
P. van Oosterom and E. Claassen, ``Orientation Insensitive Indexing Methods for Geometric Objects,'' Proc. 4th Int'l Symp. on Spatial Data Handling, Zürich, Switzerland, July 1990, 1016-1029.

B-tree Extensions

The following B-tree operators are supported:
Operators Description Example
= key equality "= 'hello'"
< key less "< 5"
<= key less or equal "<= 'hello'"
> key greater "> 5"
>= key greater or equal ">= 5"
between key1 key2 SQL BETWEEN "between 5 10"

Comments, questions and suggestions may be directed to gist@postgres.berkeley.edu

Last modified: $Date: 2001/03/21 22:01:41 $ by $Author: mct $.