[postgis-users] multi-column index w/ btree & gist

Charlton Purvis cpurvis at asg.sc.edu
Thu Sep 25 20:28:50 PDT 2003


Hi, folks:

I poked around on the discussion lists here as well as in pgsql land,
and I don't have a clear picture on making multi-column indexes.

If my table looks like this:

sea_coos_model=# \d bari_um;
                    Table "bari_um"
   Column    |            Type             | Modifiers 
-------------+-----------------------------+-----------
 ubari       | double precision            | 
 vbari       | double precision            | 
 file_date   | date                        | 
 time_index  | integer                     | 
 time_stamp  | timestamp without time zone | 
 the_geom    | geometry                    | 
 speed       | double precision            | 
 theta       | double precision            | 
 label_theta | double precision            | 
 label_speed | integer                     | 
 label_char  | character(1)                | 
 xi          | double precision            | 
 yi          | double precision            |

I'd like to create an index something like this:

create index bari_um__multi on bari_um using btree(time_stamp),
gist(the_geom);

No doubt that doesn't work.  But is there a way for me to do this?  Some
multi-column indexing stuff appears here,
http://www.sai.msu.su/~megera/postgres/gist/, but perhaps that is old?

Bottom line is that I want to tell the db to look for the time_stamp
before making any georeferenced comparisons.

Thanks,

Charlton

 
 
 
Charlton Purvis
(803) 777-8858 : voice
(803) 777-8833 : fax
cpurvis at sc.edu
 
Advanced Solutions Group
Department of Physics and Astronomy
University of South Carolina
Columbia, SC 29208




More information about the postgis-users mailing list