Is it possible to create a multicolumn index on a geometry point column and a varchar column? For example, say I have a geometry point column called "location_point" and a varchar column called "zip". I have tried this...
CREATE INDEX contacts_80_zip_location_index ON contacts_80 USING GIST (location_point, zip);
This did not work. I received this error...
ERROR: data type character varying has no default operator class for access method "gist"
HINT: You must specify an operator class for the index or define a default operator class for the data type.
SQL state: 42704
ON (CAST(location_point TO VARCHAR), zip)
– geozelot Oct 21 '19 at 11:38include
clause for gist indexes. While the values are not indexed, they are copied in the main index so you could work with the index only and avoid having to read the underlying table. – JGH Oct 21 '19 at 15:44