The Database Query Plan Comparison Studio

 Act as a database performance engineer. Build The Database Query Plan Comparison Studio, an application that helps developers compare alternative SQL execution plans and understand potential performance trade-offs.

Allow users to import execution-plan output from supported database engines or provide manually entered plan nodes and operator statistics.

The application should:

  • Visualize the query plan as a navigable tree.

  • Explain scans, joins, sorts, aggregates, and other supported operators.

  • Compare estimated and actual row counts when both are available.

  • Highlight large estimation errors, expensive operations, and potential bottlenecks.

  • Compare two plans side by side.

  • Show how indexes, predicates, and join strategies may affect execution.

  • Distinguish measured execution time from optimizer estimates.

  • Generate investigation suggestions with supporting plan evidence.

  • Export a comparison report.

Include synthetic examples involving a slow join, an inefficient scan, and a misestimated filter. Make engine-specific assumptions explicit. Never fabricate execution statistics or guarantee that an index will improve performance. The prototype should work offline with imported plan files and sample data.

Post a Comment

0 Comments