-- Create a bloom filter on a high-cardinality column to accelerate equality queries
CREATE BLOOMFILTER INDEX idx_user_id ON TABLE orders(user_id);
Create an Inverted Index
-- Create an inverted index on a text column to support full-text search
CREATE INVERTED INDEX idx_content ON TABLE app_logs(content)
PROPERTIES('analyzer' = 'chinese');
Build an Index for Existing Data
-- A new index does not cover historical data; trigger a build manually
BUILD INDEX idx_content ON app_logs;
View and Drop Indexes
-- List all indexes on a table
SHOW INDEX IN orders;
-- Drop an index
DROP INDEX idx_user_id;