Data structure used by the Dynamic Programming Algorithm for query optimization