.explain() on a query returns the query plan instead of the query itself. It would be nice to be able to get the query results and the execution plan. This would be useful from the shell, as well as from the APIs. SQL Server Management Studio, the GUI that comes with MS SQL 2k5/2k8/2k8R2 has this functionality and its very useful when debugging. It allows you to tweak a query and ensure that the result set did not change in addition to measuring performance.