[PDB-3838] Simple equality queries to the facts endpoint generates jsonb_each Created: 2018/02/07  Updated: 2018/08/24  Resolved: 2018/03/09

Status: Closed
Project: PuppetDB
Component/s: None
Affects Version/s: None
Fix Version/s: PDB 5.2.1

Type: Bug Priority: Normal
Reporter: Erik Hansen Assignee: Russell Mull
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File facts_entitiy_jsonb_each.sql    
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 }"


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)

Comment by Jeff Yarnell [ 2018/02/14 ]

Erik Hansen We have bumped this issue out of our sprint ending Feb 28 with the intent of revisiting it in early March. Any concerns?

Comment by Jeff Yarnell [ 2018/03/14 ]

Russell Mull Release notes?

Generated at Tue Aug 11 00:17:55 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.