specialized sql queries to improve startup by 2 seconds on GZ_ALL