Skip to content

perf: optimize SQL queries #515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2025
Merged

perf: optimize SQL queries #515

merged 1 commit into from
Mar 28, 2025

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Mar 28, 2025

SELECT COUNT(*) scans all the rows which takes longer and cost more. LIMIT 1 is not effective for those queries as they always return a single row.

Copy link

changeset-bot bot commented Mar 28, 2025

🦋 Changeset detected

Latest commit: 1d2343f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@opennextjs/cloudflare Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented Mar 28, 2025

Open in Stackblitz

pnpm add https://pkg.pr.new/@opennextjs/cloudflare@515

commit: 1d2343f

@vicb vicb requested review from conico974 and james-elicx March 28, 2025 16:08
Copy link
Collaborator

@conico974 conico974 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vicb
Copy link
Contributor Author

vicb commented Mar 28, 2025

Thanks!

@vicb vicb merged commit cef5e03 into main Mar 28, 2025
7 checks passed
@vicb vicb deleted the perfsql branch March 28, 2025 16:14
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.

None yet

2 participants