Improved support for query planning.