8 lines
520 B
SQL
8 lines
520 B
SQL
CREATE INDEX IF NOT EXISTS idx_products_name_trgm ON products USING GIN (name gin_trgm_ops);
|
|
CREATE INDEX IF NOT EXISTS idx_products_category_id ON products (category_id);
|
|
CREATE INDEX IF NOT EXISTS idx_products_brand_id ON products (brand_id);
|
|
CREATE INDEX IF NOT EXISTS idx_products_is_active ON products (is_active);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_product_attributes_product_key ON product_attributes (product_id, key);
|
|
CREATE INDEX IF NOT EXISTS idx_product_attributes_key_value ON product_attributes (key, value);
|