Improve the performances of the custom query wizard page.