How can one optimize %XYZ% queries?