ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/bioseg/trunk/README.bioseg
(Generate patch)
# Line 170 | Line 170
170    CREATE TABLE tt (range bioseg, id integer);
171    CREATE INDEX tt_range_idx ON tt USING gist (range);
172  
173 + Or for an existing table a function index can be used.  For example on a
174 + feature table with fmin and fmax:
175 +
176 +  CREATE INDEX bioseg_index ON feature USING gist (bioseg_create(fmin, fmax));
177 +
178 + This query will then find features that overlap 2000..3000, using the index:
179 +
180 +  SELECT * FROM feature
181 +           WHERE '2000..3000'::bioseg && bioseg_create(fmin, fmax);
182 +
183  
184   INTERBASE COORDINATES
185   =====================

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines