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

[optimization] Speed-up opening the authentication.authtoken admin by indexing created_at column #1094

Merged
merged 1 commit into from
Dec 29, 2024

Conversation

suricactus
Copy link
Collaborator

@suricactus suricactus commented Dec 29, 2024

The reason is the default ORDER BY created_at , which makes a sequence scan on the whole table.

On the local database the difference is significant with and without that index: before: Execution Time: 175.196 ms
after: Execution Time: 0.562 ms

…ted_at` column

The reason is the default ORDER BY `created_at` , which makes a sequence scan on the whole table.

On the local database the difference is significant with and without that index:
before: Execution Time: 175.196 ms
after: Execution Time: 0.562 ms
@duke-nyuki
Copy link
Collaborator

@suricactus suricactus changed the title Speed-up opening the authentication.authtoken admin by indexing `crea… Speed-up opening the authentication.authtoken admin by indexing created_at column Dec 29, 2024
@suricactus suricactus changed the title Speed-up opening the authentication.authtoken admin by indexing created_at column [optimization] Speed-up opening the authentication.authtoken admin by indexing created_at column Dec 29, 2024
@suricactus suricactus merged commit 2672a1f into master Dec 29, 2024
13 checks passed
@suricactus suricactus deleted the QF-5021-index-authtoken-created_at branch December 29, 2024 13:24
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