Skip to content

Optimize IP address query performance #8409

@diox

Description

@diox

Searching for users by ip address is currently a bit slow, the data is scattered on different tables, IPs are stored in string form as a varchar(45), and not always indexed.

One fix to investigate would be to store them as blob or varbinary, using INET6_ATON() and friends in MySQL, or ipaddress.ip_address().packed in python) and indexing that. That's blocked by #7673 because we currently do manual SQL queries with FIND_IN_SET(), which would definitely not work anymore with that approach.

Metadata

Metadata

Assignees

Labels

neverstaleUse this to tell stalebot to not touch this issue. Should be used infrequently.repository:addons-serverIssue relating to addons-serverstate:verified_fixed

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions