caches an sql statement locally before a query is made