optimizing receipt_for query