Skip to content

Optimize date filtering for spend logs queries#17073

Merged
krrishdholakia merged 1 commit intoBerriAI:mainfrom
CAFxX:CAFxX-patch-1
Nov 26, 2025
Merged

Optimize date filtering for spend logs queries#17073
krrishdholakia merged 1 commit intoBerriAI:mainfrom
CAFxX:CAFxX-patch-1

Conversation

@CAFxX
Copy link
Contributor

@CAFxX CAFxX commented Nov 25, 2025

This should allow postgres to perform a more efficient index scan instead of a sequential table scan.

These two queries consistently show up in the longest-running ones in our instance.

The same pattern is already in use in the same file.

This should allow postgres to perform a more efficient index scan instead of a sequential table scan.

These two queries consistently show up in the longest-running ones in our instance, and are a major latency source for the usage page on the admin UI.
@vercel
Copy link

vercel bot commented Nov 25, 2025

@CAFxX is attempting to deploy a commit to the CLERKIEAI Team on Vercel.

A member of the Team first needs to authorize it.

@krrishdholakia krrishdholakia merged commit a727f71 into BerriAI:main Nov 26, 2025
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants