Jira (PDB-3171) query compilation is very slow for queries with giant arrays

5 views
Skip to first unread message

Wyatt Alt (JIRA)

unread,
Nov 4, 2016, 1:08:03 PM11/4/16
to puppe...@googlegroups.com
Wyatt Alt created an issue
 
PuppetDB / Bug PDB-3171
query compilation is very slow for queries with giant arrays
Issue Type: Bug Bug
Assignee: Unassigned
Attachments: query.json
Created: 2016/11/04 10:07 AM
Priority: Normal Normal
Reporter: Wyatt Alt

Nick Lewis alerted me that queries like the attached take a long time (30s+) to compile. I did some crude sampling of stack dumps and it looks like (unsurprisingly) we're spending most of that time in pre-order-visit. We should do some targeted optimization of query compilation – even with 10k nodes in the array, 30s seems way excessive.

The problem occurs with large numbers of "or" clauses as well, so there's no particular reason to think this issue is array-specific.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Russell Mull (JIRA)

unread,
Apr 20, 2017, 12:11:03 PM4/20/17
to puppe...@googlegroups.com

Karen Van der Veer (JIRA)

unread,
Apr 24, 2017, 11:45:03 AM4/24/17
to puppe...@googlegroups.com

Rob Browning (JIRA)

unread,
Apr 27, 2017, 4:16:03 PM4/27/17
to puppe...@googlegroups.com

Russell Mull (JIRA)

unread,
Jul 21, 2017, 4:37:04 PM7/21/17
to puppe...@googlegroups.com

Margaret Lee (Jira)

unread,
Apr 29, 2021, 6:31:02 PM4/29/21
to puppe...@googlegroups.com
Margaret Lee updated an issue
Change By: Margaret Lee
Epic Link: PE-31891
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Austin Blatt (Jira)

unread,
Mar 1, 2023, 2:00:03 PM3/1/23
to puppe...@googlegroups.com
Austin Blatt updated an issue
Change By: Austin Blatt
Team: PuppetDB Skeletor
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Austin Blatt (Jira)

unread,
Mar 1, 2023, 2:01:01 PM3/1/23
to puppe...@googlegroups.com
Austin Blatt assigned an issue to Nick Lewis
Change By: Austin Blatt
Assignee: Rob Browning Nick Lewis

Austin Blatt (Jira)

unread,
Mar 1, 2023, 2:02:02 PM3/1/23
to puppe...@googlegroups.com

Cas Donoghue (Jira)

unread,
Mar 1, 2023, 2:11:02 PM3/1/23
to puppe...@googlegroups.com

Austin Blatt (Jira)

unread,
Mar 7, 2023, 9:51:01 PM3/7/23
to puppe...@googlegroups.com
Austin Blatt commented on Bug PDB-3171
 
Re: query compilation is very slow for queries with giant arrays

This has successfully promoted to 2021.7 and main.

Austin Blatt (Jira)

unread,
Mar 8, 2023, 11:54:02 AM3/8/23
to puppe...@googlegroups.com
Austin Blatt commented on Bug PDB-3171

Promoted into main as 2023.1.0-rc1-92-g7108a7f, tests look green except some ones that have been persistently red for weeks.

Promoted into 2021.7.x as 2021.7.3-rc1-77-g6c56868, waiting to see results of pe-integration tests, which are still running

Austin Blatt (Jira)

unread,
Mar 8, 2023, 2:00:03 PM3/8/23
to puppe...@googlegroups.com
Austin Blatt updated an issue
 
Change By: Austin Blatt
Fix Version/s: PDB 7.12.2
Fix Version/s: PDB 8.0.0

Austin Blatt (Jira)

unread,
Mar 8, 2023, 2:02:01 PM3/8/23
to puppe...@googlegroups.com
Austin Blatt commented on Bug PDB-3171
 
Re: query compilation is very slow for queries with giant arrays

Same set of old failures on main, so I'll say that's "good enough". Unfortunately, due to the state of internal CI, that's likely the best we can get right now.

Austin Blatt (Jira)

unread,
Mar 8, 2023, 2:03:02 PM3/8/23
to puppe...@googlegroups.com

Austin Blatt (Jira)

unread,
Mar 8, 2023, 2:04:01 PM3/8/23
to puppe...@googlegroups.com
Austin Blatt updated an issue
Change By: Austin Blatt
Release Notes Summary: Improved speed of queries that filter based on giant arrays.

Ingrida Cazers (Jira)

unread,
Mar 16, 2023, 5:07:04 PM3/16/23
to puppe...@googlegroups.com
Ingrida Cazers commented on Bug PDB-3171
 
Re: query compilation is very slow for queries with giant arrays

Nick Lewis I'm planning to document this enhancement in PE 2023.1 and PE 2021.7.3, scheduled for release in April. I have two questions:

1. Is the following description correct?

_*Improved performance when querying PuppetDB *

This enhancement helps to improve performance for PuppetDB queries involving thousands of nodes. _

2. Is this considered an improvement in PE, to be documented in the PE release notes, or should it be documented in the PuppetDB release notes?

https://www.puppet.com/docs/puppetdb/7/release_notes.html?_ga=2.135361270.633001831.1678722544-1884905924.1648157504&_gac=1.52716316.1678735900.EAIaIQobChMItKWMttLZ_QIVvBKtBh2nZgD7EAAYASAEEgJkPvD_BwE&_gl=1*1rkuc9i*_ga*MTg4NDkwNTkyNC4xNjQ4MTU3NTA0*_ga_7PSYLBBJPT*MTY3ODk5OTczNi4zNjAuMS4xNjc5MDAwMjg3LjAuMC4w

Ingrida Cazers (Jira)

unread,
Mar 21, 2023, 6:47:01 PM3/21/23
to puppe...@googlegroups.com

In a Slack conversation today, Nick and I agreed on the following text:

Improved performance when querying PuppetDB

This enhancement helps to improve performance for PuppetDB queries that contain large arrays, for example, if many nodes are enumerated or many terms are joined by a single "and" or "or" element.

Ingrida Cazers (Jira)

unread,
Mar 22, 2023, 4:54:02 PM3/22/23
to puppe...@googlegroups.com

I will plan to document this update in the PE release notes, and will leave it to the PuppetDB develoment team to document it in the PuppetDB release notes.

Jonathan Newman (Jira)

unread,
Apr 4, 2023, 4:36:01 PM4/4/23
to puppe...@googlegroups.com
Jonathan Newman updated an issue
 
Change By: Jonathan Newman
Fix Version/s: PDB 7.12.2
Fix Version/s: PDB 7.13.0

Charmaine Pritchett (Jira)

unread,
Apr 10, 2023, 2:22:03 PM4/10/23
to puppe...@googlegroups.com
Charmaine Pritchett updated an issue
Change By: Charmaine Pritchett
Labels: jira_escalated query-engine-improvements

Charmaine Pritchett (Jira)

unread,
Apr 10, 2023, 2:24:01 PM4/10/23
to puppe...@googlegroups.com
Charmaine Pritchett updated an issue
Change By: Charmaine Pritchett
Zendesk Ticket Count: 1
Zendesk Ticket IDs: 51143

Ingrida Cazers (Jira)

unread,
Apr 10, 2023, 5:24:03 PM4/10/23
to puppe...@googlegroups.com
Ingrida Cazers updated an issue
Change By: Ingrida Cazers
Labels: docs docs-reviewed jira_escalated query-engine-improvements
Reply all
Reply to author
Forward
0 new messages