queries frequency optimization