T156318#3030343 for context. We should skip the BETWEEN query for an IP range if we can get the same results with a much more efficient wildcard search.
For IPv6, this should be done when the CIDR is a multitude of 16, e.g. rev_user_text like "2602:306:%" instead of checking 2602:306::/32
For IPv4 when it is a multitude of 8, e.g. rev_user_text like "10.0.0.%" instead of 10.0.0.0/24
However in the interface I would not convert the inputted value to the wildcard that was actually used on the backend, just to avoid confusion. So if I enter 10.0.0.0/24 it should still say 10.0.0.0/24 after submission.