Polynomial heuristics for query optimization | Synapse