Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-5055

Add a new query param that returns EXPLAIN ANALYZE output for a given query

    XMLWordPrintable

    Details

    • Template:
    • Acceptance Criteria:
      • New query param which causes any query to return EXPLAIN ANALYZE output
      • Tests which check that this param works across a handful of the query endpoints
      • Documentation explaining the new query param
    • Team:
      Ghost
    • Story Points:
      3
    • Sprint:
      ghost-24.03.2021, ghost-7.04.2021, ghost-21.04.2021
    • Method Found:
      Needs Assessment
    • Release Notes:
      New Feature
    • Release Notes Summary:
      Hide
      A new paging option was added (explain). This can be used to tell PuppetDB to return the execution plan of a statement. The execution plan shows how the table(s) referenced by the statement will be scanned, the estimated statement execution cost and the actual run time statistics.

      This value should be an the string "analyze", any other value will not be validated.
      Show
      A new paging option was added (explain). This can be used to tell PuppetDB to return the execution plan of a statement. The execution plan shows how the table(s) referenced by the statement will be scanned, the estimated statement execution cost and the actual run time statistics. This value should be an the string "analyze", any other value will not be validated.
    • QA Risk Assessment:
      Needs Assessment

      Description

      We want to expose the EXPLAIN ANALYZE option added to the TK PuppetDBServer query method in PDB-5042 externally via a query param.

      To add the query param we could follow the example in the initial drop-joins pr. This pr added a optimize_drop_unused_joins=true query parameter to allow clients to opt-in to drop-joins. Following a similar pattern should allow us to pass down a flag which should eventually hit the same path used in PDB-5042 which will return the JSON of an EXPLAIN ANALYZE for a given query.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              oana.tanasoiu Oana Tanasoiu
              Reporter:
              zachary.kent Zachary Kent
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support