Query database on resize only