In a PostGIS enabled DB, I have a 1.7GB table with a raster column rast. I need to create an index on that column in order to speed up my raster queries.
I have tried the following:
CREATE INDEX elevations_index ON elevations USING GIST (rast);
But it returns:
ERROR: data type raster 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
As far as I know, GIST index must be used to index spatial data types. But I failed to create one. However I have managed to create a HASH Index on the same rast column, using:
CREATE INDEX elevations_index ON elevations USING Hash (rast)
Does this help enhancing the performance of my queries?
Updated: In my query I'm using ST_Union, ST_Intersects, ST_Clip, and ST_Value to find pixels that satisfy some value constraints.