antoniop
committed
on 13 Mar
Rewrite the query to leverage transparent variable quoting, replace count with quicker existance check, bring sql inline