Skip to content
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

Fix DB performance #20

Open
nkoenig opened this issue Apr 11, 2024 · 0 comments
Open

Fix DB performance #20

nkoenig opened this issue Apr 11, 2024 · 0 comments
Assignees

Comments

@nkoenig
Copy link
Contributor

nkoenig commented Apr 11, 2024

This SQL statements is called very frequently:

SELECT * FROM `models` WHERE `models` . `deleted_at` IS NULL AND ( ( `private` = ? ) ) ORDER BY `created_at` DESC , `id` LIMIT ? OFFSET ?

It's dramatically impacting DB performance. We could do the following.

  1. Cache the result.
  2. Figure out why it's being called so frequently.
  3. Using indexing or something other technique to improve the select peformance.
@nkoenig nkoenig self-assigned this Apr 11, 2024
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

No branches or pull requests

1 participant