Complete the code to create a GiST index on the 'location' column of type 'point'.
CREATE INDEX idx_location ON places USING [1] (location);The GiST index type is used for geometric data types like 'point'. Here, 'gist' is the correct index method.
Complete the code to create a GiST index on the 'description' column using the appropriate operator class for trigram search.
CREATE INDEX idx_description ON documents USING gist (description [1]);For trigram search on text columns with GiST indexes, the 'gist_trgm_ops' operator class is used.
Fix the error in the GiST index creation for a polygon column named 'area'.
CREATE INDEX idx_area ON regions USING [1] (area);Geometric types like polygons require GiST indexes for efficient spatial queries. 'gist' is the correct index type.
Fill both blanks to create a GiST index on the 'content' column using the correct operator class for trigram search.
CREATE INDEX idx_content ON articles USING [1] (content [2]);
The GiST index is created using 'gist' and the operator class for trigram search with GiST is 'gist_trgm_ops'. This combination enables trigram indexing with GiST.
Fill all three blanks to create a GiST index on the 'shape' column of type 'polygon' and a trigram GiST index on the 'summary' column.
CREATE INDEX idx_shape ON data USING [1] (shape); CREATE INDEX idx_summary ON data USING [2] (summary [3]);
Two separate CREATE INDEX statements are required. Use 'gist' for the geometric 'shape' column and 'gist' with 'gist_trgm_ops' for trigram search on 'summary'.