Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

perf: add pricing_tier_id index on prices table (#10737)

Hassieb Pakzad84750beee623
diff --git a/packages/shared/prisma/migrations/20251127181728_add_prices_index_on_pricing_tier_id/migration.sql b/packages/shared/prisma/migrations/20251127181728_add_prices_index_on_pricing_tier_id/migration.sql
new file mode 100644
index 0000000000..74a6ac0993
--- /dev/null
+++ b/packages/shared/prisma/migrations/20251127181728_add_prices_index_on_pricing_tier_id/migration.sql
@@ -0,0 +1,2 @@
+-- CreateIndex
+CREATE INDEX CONCURRENTLY "prices_pricing_tier_id_idx" ON "prices"("pricing_tier_id");
diff --git a/packages/shared/prisma/schema.prisma b/packages/shared/prisma/schema.prisma
index 28783f194c..e27d3df53e 100644
--- a/packages/shared/prisma/schema.prisma
+++ b/packages/shared/prisma/schema.prisma
@@ -871,6 +871,7 @@ model Price {
price Decimal
@@unique([modelId, usageType, pricingTierId])
+ @@index(pricingTierId)
@@map("prices")
}