-- Partial index on optimization_features.organization for non-null values only
-- Covers the getUniqueOrganizations query: SELECT DISTINCT organization WHERE organization IS NOT NULL
-- A partial index is much smaller and faster to scan than a full B-tree index when most values are null
CREATE INDEX IF NOT EXISTS "optimization_features_organization_not_null_idx"
ON "optimization_features"("organization")
WHERE organization IS NOT NULL;
