Want to find slow running queries? Or quickly diagnose and fix performance issues on your MongoDB database?
In Studio 3T 2023.9, we’ve introduced the Query Profiler where you can find slow queries and investigate them with the visual explain plan tool or dive deep in the JSON format. When you’ve identified the source of the problem, you can fix slow queries in Studio 3T’s code editors. Or, you can use the Index Manager to quickly add indexes or change the indexed fields to speed up the performance of your MongoDB queries.
Headline Features of Studio 3T 2023.9
The Query Profiler uses the MongoDB Database Profiler to capture slow running queries and displays the profiling data in a format that is easy to understand.
The Profiler switch turns the MongoDB Database Profiler ON or OFF to start or stop collecting profiling data. You can filter the profiling data for a selected time period. Exact query groups unique queries where field values are taken into account and Query shape groups queries with the same logical structure but ignores field values. You can see how many times the query ran, when it ran, and how long it took to run. You can even see if it is a find or aggregation query.
Keys examined shows how many index entries were scanned. If it is zero, this may indicate that you need to create indexes. To dig deeper into why a query is slow, you can view all the profiling data using View Full JSON.
Explain plan is a visual representation of the query plan and the steps MongoDB took to run a query, with runtime statistics for each step. Explain plan also shows if MongoDB performed a collection scan or an index scan.
Query Code shows the query in mongo shell language. You can open the query to debug and fix it in Studio 3T’s editors: IntelliShell, the Aggregation Editor, the Collection Tab, or Visual Query Builder.
Learn more about the Query Profiler in the Knowledge Base article How to find and analyze slow queries in MongoDB.
Improvements in Studio 3T 2023.9
- In the Preferences dialog, the Team Sharing page now detects when an email address is listed in both the block and allow lists.
- The icons for locked connections are more consistent with the icons for unlocked connections.
- Autocomplete suggestions are now case-insensitive.
- Copy Text Selection is now available in the context menu in the Raw shell output tab.
- IntelliShell is now able to handle large and complex scripts with better performance.
- Results for findOne ( ) are now treated in a manner that is consistent with find ( ) results.
- Added support for custom stage names.
- Added support for the $listSampledQueries and $listSearchIndexes aggregation stages, and the $median and $percentile operators.
For compatibility with Oracle Autonomous Database, the loadBalanced option is now included for non-SRV connections.
In the Query History and Query Browser tabs, Clear History is enabled by default.
The Insert JSON Document dialog now accepts an array of documents as well as a single document.
- A refresh button is now available in the results tab in IntelliShell and SQL Query.
- For compatibility with Amazon DocumentDB, Studio 3T doesn’t attempt to use allowDiskUse and collation options unless they differ from the defaults.
Studio 3T users are a valuable source of feedback helping make the application better. For the release of Studio 3T 2023.9, we’d like to thank John Tilley and Hilary Vignes for identifying an issue with the loadBalanced option on non-SRV connections, Andreas Kroll for suggesting adding index hints in aggregations, Nathaniel Mishkin for noting a problem with index hints in Visual Explain, Mageswari Dhevi for pointing out a missing refresh button in IntelliShell, Colin Rowley for letting us know about a startup problem, Yogesh Konda Jagdish, Brototy Chattopadhyay, Priyank Mavani, Lukas Usinskas, and Aleksandr Malcev for reporting a compatibility issue with allowDiskUse and collation on Amazon DocumentDB, Christopher Hardy for reporting an error when running automated tasks, Mete Erzincanlı for notifying us of a performance issue with large scripts, Rushit Vaghasiya for reporting a problem with direction in Visual Explain, and Marek Pepke for making a suggestion about remembering database and collection pairs in the Follow Reference dialog.
Fixed in Studio 3T 2023.9
- Fixed an application failure that occurred when rapidly removing and resetting the read-only lock on a shared query.
- Fixed an issue in the Preferences dialog where pressing Enter when entering an email address in the block or allow list closed the dialog.
Fixed an issue where the input for the OpenAI API Key accepted trailing newlines, resulting in an error when trying to use the key.
- Fixed an issue where IntelliShell result tabs persisted when restarting the shell, even when they weren’t pinned.
- Fixed an issue where pressing (⌘ / Ctrl + Enter) inserted a new line in certain cursor positions.
- In the Options dialog, fixed an issue where editing the index specification for the index hint caused an error message to appear.
- In the Options dialog, under Use index hint, fixed an issue where existing indexes weren’t available for selection.
- Fixed an issue where an empty folder remained collapsed after adding a connection to it.
- Fixed an issue in the Import Connections dialog where the options in the folder list duplicated each time a file was selected.
Visual Query Builder
Fixed an issue where UUIDs were not properly displayed.
Fixed an issue where field name auto-suggestions were sourced from the wrong collection if the SQL script contained multiple SELECT statements.
Fixed an issue where index hints were not applied in the Explain tab in IntelliShell.
Fixed compatibility problems from 2023.7 onwards with CSV export tasks created in previous versions.
- Fixed an application failure when disabling a trial version of Studio 3T and having a Collection Tab open for a shared connection.
- The Follow Reference dialog now remembers different target databases and/or collections for different source fields, including after the tab has been closed.
For the full history of changes in Studio 3T, see the change log.
Auto-update in the app, or start your free 30-day trial today:Download Studio 3T