Conditionally compile in query histograms