Optimize the output for EXPLAIN command
Fix bug if database specified