Skip to content

optimise slow queries - #63

Open
NtTestAlert wants to merge 1 commit into
OlafvdSpek:masterfrom
NtTestAlert:slow-query-fix-1
Open

optimise slow queries#63
NtTestAlert wants to merge 1 commit into
OlafvdSpek:masterfrom
NtTestAlert:slow-query-fix-1

Conversation

@NtTestAlert

Copy link
Copy Markdown

The queries were slow
first one used full table scan, while it can take advantage of index on flags
second one scanned also those rows which were already active=0

@ghost

ghost commented Dec 16, 2019

Copy link
Copy Markdown

The 2nd query is a killer. I had 5 millions peers on the peers table and everytime that query ran it hanged the tracker for 5-10 seconds...it should be corrected.

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.

1 participant