假设有一个包含 5 列的表(id、first_name (text)、last_name(text)、product_name(text) 和 available(boolean))。
CREATE INDEX IF NOT EXISTS "idx-firstname-lower + product_name"
ON persons (LOWER(first_name), product_name) WHERE available;
假设有一个包含 5 列的表(id、first_name (text)、last_name(text)、product_name(text) 和 available(boolean))。
CREATE INDEX IF NOT EXISTS "idx-firstname-lower + product_name"
ON persons (LOWER(first_name), product_name) WHERE available;