cache query efficiency