Snowflake Error:
SEARCH_OPTIMIZATION_NOT_SUPPORTED
What does this error mean?
A search optimization operation failed because the table type, column type, or operation is not compatible with Snowflake's search optimization service.
Common causes
- 1Attempting to add search optimization to a temporary or transient table (not supported)
- 2Trying to optimize a column with an unsupported data type (e.g., VARIANT) in a non-supported configuration
- 3The account tier does not include the search optimization service (requires Enterprise or above)
- 4Attempting to use ON EQUALITY or ON SUBSTRING with a data type that does not support it
How to fix it
- 1Verify the account tier: run SELECT CURRENT_ACCOUNT() and check your Snowflake contract — search optimization requires Enterprise edition or above.
- 2Check that the table is a permanent table: SHOW TABLES LIKE '<name>' — temporary and transient tables do not support search optimization.
- 3Check supported column types: search optimization supports EQUALITY and SUBSTRING on VARCHAR, NUMBER, DATE, and TIMESTAMP columns — VARIANT, GEOGRAPHY, and ARRAY columns are not supported without additional configuration.
- 4If search optimization was partially added, remove it first and re-add with supported columns: ALTER TABLE <name> DROP SEARCH OPTIMIZATION, then ALTER TABLE <name> ADD SEARCH OPTIMIZATION ON EQUALITY(<col>).
- 5For unsupported column types or table types, use clustering keys or materialized views as alternative query acceleration strategies.