dbKoda Tips and Tricks
Top 5 things to help you master MongoDB
1. The Embedded Terminal
Every experienced DBA knows that sometimes you’ve got to go low level and get your hands dirty when creating the perfect database server, and this often means stepping outside of the database itself to the OS level. Instead of having to open another app in a separate window, we’ve embedded an interactive terminal directly in to dbKoda!
To open a local terminal (e.g: a terminal running on your desktop computer), right click on an empty space in the profile list and select “New Local Terminal”
To open a terminal on your database server, make sure you have SSH enabled, then right click on that profile and select “New SSH Terminal”
2. The Index Advisor.
Have you got a massive, complicated query that you think might be running longer than it should? Try using our explain plan interface to find out exactly what your query is doing while you’re not looking. You can even click the “Index Advisor” button for dbKoda to suggest some helpful optimizations. Indexes are the key to good query performance!
3. The Storage Drilldown Chart.
So your system administrator keeps sending you passive aggressive emails about how you’re using up all the disk space on the server, but you haven’t inserted a document in months. With all the automated data ingestion these days, it’s hard to know exactly where all your storage goes. To get a deeper understanding of how much data you actually have, try the Storage Drilldown view.
4. Translate to Driver Code.
If you’re building a MEAN stack app, it can be frustrating to perfect your query in the Mongo Shell but then have to rewrite it in the NodeJS driver for your application. We’ve created a simple translator to convert your shell code into NodeJS function that can be reused with different parameters, hopefully helping you create an even better app.
5. Different View Formats
Here at dbKoda we love JSON and all its many benefits, but it’s hard to deny that sometimes the human eye can’t easily process the information contained in a large, nested document. To make the most sense of your query output, you can use the view buttons in the output tab:
This will generate a view based on your last command, to view specific output in a certain format, you can also right click on a piece of data in the raw output.
Thanks for Reading!
If you have any questions, queries or feature requests, please comment below!
dbKoda is completely free and open source on Mac, Linux and Windows. Download the app here and let us know what you think.