storing source query result in memory