Studio Query Plans

By , · 2 minute read

Understanding query plans is the key to consistently writing fast queries, so today we are pleased to announce revamped query plan support in Studio.

For a primer on query plans, please review How to Read Stardog Query Plans.

Viewing Query Plans

Query plans for both SPARQL and GraphQL queries are now rendered in Monaco, the same rich text editor we use for editing queries. By default query plans are rendered as JSON with support for object folding and hover states to help you grok your queries faster.

Code folding keyboard shortcuts

Operation macOS Windows Linux
Fold region ⌥⌘[ Ctrl+Shift+[ Ctrl+Shift+[
Unfold region ⌥⌘] Ctrl+Shift+] Ctrl+Shift+]
Fold all subregions ⌘K ⌘[ Ctrl+K Ctrl+[ Ctrl+K Ctrl+[
Unfold all subregions ⌘K ⌘] Ctrl+K Ctrl+] Ctrl+K Ctrl+]
Fold all regions ⌘K ⌘0 Ctrl+K Ctrl+0 Ctrl+K Ctrl+0
Unfold all regions ⌘K ⌘J Ctrl+K Ctrl+J Ctrl+K Ctrl+J

Alternatively you can view query plans as Plain Text – the familiar ASCII tree view of old.

If you prefer this Plain Text view then you can set defaultQueryPlanFormat: "txt" in your user settings.

Saving & Sharing Query Plans

Optimizing queries is often a team sport. Whether reaching for a coworker, a friend, the community, or Stardog Support, sharing plans is crucial. So we have fixed a couple bugs with this release: plans can be copied to your clipboard and saved as files.

Furthermore, when you open JSON query plans whose filename matches *sparql*explanation*.json or *graphql*explanation*.json you get the same syntax highlighting and validation in the editor as when you first requested the plan in Studio.

Conclusion

Studio is the Stardog Knowledge Graph IDE and that means supporting users’ full development cycle. With this release we are excited to deliver user-friendly tools to write better queries. If you have any feedback or suggestions we would love to hear from you in our community forums!


Top