Skip to content

Enhance FindOrCreatePayer performance#1565

Merged
fbac merged 1 commit intomainfrom
fbac/payer-tweak
Jan 26, 2026
Merged

Enhance FindOrCreatePayer performance#1565
fbac merged 1 commit intomainfrom
fbac/payer-tweak

Conversation

@fbac
Copy link
Copy Markdown
Collaborator

@fbac fbac commented Jan 23, 2026

Update FindOrCreatePayer query to use a union CTE for id selection to improve performance in payer_reports.sql and regenerate payer_reports.sql.go

Add CTE u that unions ins and existing payer lookup, and change the final select to SELECT id FROM u LIMIT 1 in payer_reports.sql; regenerate corresponding code in payer_reports.sql.go.

📍Where to Start

Start with the FindOrCreatePayer SQL in payer_reports.sql, then review the generated changes in payer_reports.sql.go.


Macroscope summarized 4b0ae57.

@fbac fbac requested a review from a team as a code owner January 23, 2026 18:23
@fbac fbac merged commit 319c2a2 into main Jan 26, 2026
12 checks passed
@fbac fbac deleted the fbac/payer-tweak branch January 26, 2026 11:49
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