[postgis-users] Multicolumn queries: GiST and strings
Paul Ramsey
pramsey at refractions.net
Thu Jun 20 08:48:15 PDT 2002
Hi Andy,
I have not completely verified this, but I think the multikey patches
Oleg and Theodor released last year were rolled into 7.2, so at an
infrastructure level, the support for multikey should be there. At the
higher level, maybe not. Check contrib/btree_gist and see what data
types they implemented their demonstration btree support on. Maybe all
of them. In that case, it would be exciting to hear if you can do a
multicolumn index with postgis and normal types together. Also, read the
latest and greatest at O&T's site...
http://www.sai.msu.su/~megera/postgres/gist/
Paul
Andy Turk wrote:
>
> I'd like to be able to create an index that uses two columns, one geometry
> and one string. I have a very slow query that uses only a geometry index
> right now.
>
> It's functionally correct, but expensive because the GiST index (correctly)
> returns tens of thousands of rows which are then scanned sequentially to find
> matching records.
>
> The perfect solution would be a multi column GiST index that both the
> geometry column and the string column to quickly get to the right results.
>
> Here's what I tried to do (where "stringcol" is a VARCHAR):
>
> CREATE INDEX foo ON mytable USING
> GIST (the_geom GIST_GEOMETRY_OPS, stringcol);
>
> ERROR: data type character varying has no default operator class for access
> method "gist"
> You must specify an operator class for the index or define a default operator
> class for the data type
>
> I listed out the operator classes and the only gist-related class I found was
> the geometry stuff--nothing for strings.
>
> Is there a package of string operations for GiST somewhere? Has anyone
> successfully used a multicolumn GiST index with geometry objects before?
>
> Thanks,
>
> Andy Turk
> andy at streetlight.com
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
--
__
/
| Paul Ramsey
| Refractions Research
| Email: pramsey at refractions.net
| Phone: (250) 885-0632
\_
More information about the postgis-users
mailing list