Title: Efficient Memoization Algorithms for Query Optimization