chore(pricing): Pricing retrieval improvements (#12128)

**What**
I have removed the check for the context key where it was fetching all attributes available and then stripping out the one that does not exists.. On big dataset these would remove multiple hundreds of ms of query execution
This commit is contained in:
Adrien de Peretti
2025-04-10 09:39:21 +00:00
committed by GitHub
parent 6ae1e7b708
commit 07252691c5
8 changed files with 671 additions and 127 deletions
@@ -18,6 +18,10 @@ const PriceRule = model
where: "deleted_at IS NULL",
unique: true,
},
{
on: ["attribute"],
where: "deleted_at IS NULL",
},
{
on: ["attribute", "value"],
where: "deleted_at IS NULL",