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

Add index to download_urls.scan_id #170

Merged
merged 1 commit into from
Sep 27, 2023
Merged

Conversation

jonathan-d-zhang
Copy link
Contributor

Adds an index to the scans id column. This speeds up queries by ~182x.
Testing with:

#!/bin/bash
pgbench -n -f query.sql -T120 -P24 -c5 -j5 \
    postgresql://postgres:postgres@localhost:5432/dragonfly

Existing

number of transactions actually processed: 28991
latency average = 20.694 ms
latency stddev = 4.759 ms
tps = 241.591310 (without initial connection time)

New

number of transactions actually processed: 5264042
latency average = 0.114 ms
latency stddev = 0.023 ms
tps = 43874.227030 (without initial connection time)

Copy link
Contributor

@Robin5605 Robin5605 left a comment

Choose a reason for hiding this comment

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

looks good. thanks

@AbooMinister25 AbooMinister25 merged commit 98b98f2 into main Sep 27, 2023
7 checks passed
@AbooMinister25 AbooMinister25 deleted the download_url-index branch September 27, 2023 00:22
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.

3 participants