| We want to be able to pass a flag to the TK PuppetDBServer query method which will cause a given query to be wrapped in an EXPLAIN (analyze, buffers, format json) block. See Postgres's explain docs for more details. You'll need to thread this option down from query -> stream-query-result -> query->sql -> compile-user-query->sql -> compile-query. In compile-query we'll need to add a way to concatenate the EXPLAIN command to the generated query. Doing this will enable future performance testing work and will allow us to enable outside users to get the EXPLAIN ANALYZE results of a query without needing to log into a psql prompt after recreating the SQL that PDB generated. |