372
Postgres query got 40x slower after I added a tenant_id filter Performance
The query is . Without the tenant filter it returns in about 8ms. With it, 300 to 400ms, and worse for small tenants than big ones, which makes no sense to me. Table is around 30 million rows and there's an index on and…