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

Simple equality queries to the facts endpoint generates jsonb_each

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PDB 5.2.1
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      Data Platform
    • Story Points:
      3
    • Sprint:
      Data Platform 2018-03-14
    • Method Found:
      Customer Feedback
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Significantly improve performance of facts queries which constrain 'name' to a single value (for example: "facts [value, count()] { name = 'osFamily' group by value }"

      Description

      This happens for simple equality:

      puppet query "facts[name, value, count()] { name ='is_virtual' group by value }"

      does this.

      someone tried to work around the problem like this:

      puppet query "facts[name, value, count()] { name in ['is_virtual','kernel','aio_agent_version'] group by name, value }"

      But that was still slow. The resulting query plan:

      (attached in facts_entitiy_jsonb_each.sql)

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                russell.mull Russell Mull
                Reporter:
                erik.hansen Erik Hansen
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support