Skip to content
Studio 3T - The professional GUI, IDE and client for MongoDB
  • Tools
    • Aggregation Editor
    • IntelliShell
    • Visual Query Builder
    • Export Wizard
    • Import Wizard
    • Query Code
    • SQL Query
    • Connect
    • Schema Explorer
    • Compare
    • SQL ⇔ MongoDB Migration
    • Data Masking
    • Task Scheduler
    • Reschema
    • More Tools and Features
  • Solutions
  • Resources
    • Knowledge Base
    • MongoDB Tutorials & Courses
    • Tool/Feature Documentation
    • Reports
    • Case Studies
    • Whitepapers
    • Blog
    • Testimonials
    • Community
  • Contact us
    • Contact
    • Sales Support
    • Feedback and Support
    • Career
    • About Us
  • Store
    • Buy Now
    • Preferred Resellers
    • Team Pricing
  • My License
  • Download
search

Help! How can I find my lost query! #Studio3T_AMA

Posted on: 17/11/2021 by DJ Walker-Morgan

Q: I just cleared the query I’ve been building and I don’t know how to get it back? Is there any way to find a previous query? HELP!

Welcome to the latest Studio 3T Ask Manatees Anything – #Studio3T_AMA. Want to know how to use Studio 3T to make your MongoDB life better? Just tweet and use #Studio3T_AMA or email [email protected].

A: Don’t panic! Studio 3T has you covered. Every time you execute a query in the Collections Tab it is automatically saved in the Studio 3T query history. So the first thing to reach for is your Query History which you can get to by clicking on the “Search Query History” icon:

Finding the Query History

Click here and that will bring up the “Find Query Manager”, where we can find your missing query.

Searching with the Find Query Manager

Now, this is a store of all your query history from across all your collections.

The Find Query Manager is full of your Studio 3T query history.
The Find Query Manager, full of your query history

It’s not per collection, so you can recall a query from the history to run against any collection. Each entry in the history includes the query itself, the associated projection and sort settings and the values for skip and limit.

We’re talking about the Collections Tab query history in this article. IntelliShell has its own query history where it records the text of the script that made a query; the idea is essentially the same and it works in a similar way.

You will also see the date and time for when that query was executed. So, if you wanted to find that query you made on Tuesday at 15:00, just scroll down the list and you’ll find the queries you were making at that time. 

If you want to locate your query by say, a field name or value that you know you used, then the Search History field is the tool for you. Click on the Search History field or press Control/Command+F to focus on it and enter your search term.

Selecting a row in the history will display all its details in the Overview in a more readable format.

The Find Query Manager, full of your searchable query history

 The list will update as you type showing only matches to that term for either field names or values.

Rescuing from the Find Query Manager

Once you find the query you are interested in, the Find Query Manager has a couple of options for what you can do with it. You can click the Select button (or double click the row in the list) and the query will be immediately loaded into your Collections Tab. 

Or you can bookmark your query for future use by selecting “Save As Bookmark” at the top of the Find Query Manager. Studio 3T will ask for a bookmark name. It will then be added to the Studio 3T query bookmarks. You will be able to recall them through the star icon to the right of the Query Manager icon. Or if you have the Find Query Manager open, just click the Bookmarks tab.

Finally, you can make your query a default query for the collection when displayed in the Collections tab. A default query is a sticky query that is automatically loaded whenever the collection is opened in the collections view. You can set a different default query for each and every collection. To use your selected query, click the “Set As Default Query” button at the bottom of the Find Query Manager. You manage the default query for a collection through the anchor icon to the left of the Query Manager icon. 

We have some questions about the bookmark and default query controls in the Ask Manatees Anything inbox, so we’ll talk about them in the near future. Suffice to say you can send your queries to either.

Tidying Up

Finally there are two other items on the Find Query Manager worth noting. Remove Selected will delete one selected row from your history, while Clear All will remove all of them. Both prompt for confirmation that you want to delete; once it is gone, it’s gone for good.

All being well, if you’ve got this far, you’ve already recovered that query you lost and you’re back digging deep into MongoDB and your data with the help of Studio 3T.


How helpful was this article?
This article was hideous
This article was bad
This article was ok
This article was good
This article was great
Thank you for your feedback!

About The Author

DJ Walker-Morgan

Dj has been around since Commodore had Pets and Apples grew everywhere. With a background in Unix and development, he's been around the technology business writing code or writing content ever since.

Related articles

  • MongoDB Atlas Pricing & Tips to Help Manage Costs
  • 5 MongoDB Security Tips to Help Keep the Cats Away
  • Why can’t I change the _id field? #Studio3T_AMA
  • Top 6 MongoDB Hosting You Can Try for Free (Updated)
  • AMA: How can Studio 3T’s Tasks make me more efficient?

Tags

academy aggregation AMA atlas community connections date tags export features hackolade import intellishell JSON knowledge base migration modelling mongodb mongoodb productivity query regex releases schema security SQL Studio 3T tasks tips updates webinar windows

Browse by MongoDB topic

  • Connecting to MongoDB
  • Database Administration & Security
  • Getting Started with MongoDB
  • Getting Started with Studio 3T
  • Import/Export
  • Job Automation & Scheduling
  • MongoDB Aggregation Framework
  • MongoDB/Studio 3T Workshops
  • Performance
  • Query & CRUD Operations
  • Schema
  • Studio 3T Licensing
  • Support and other resources
  • Working with MongoDB & SQL
  • Working with MongoDB Atlas

Studio 3T

MongoDB Enterprise Certified Technology PartnerSince 2014, 3T has been helping thousands of MongoDB developers and administrators with their everyday jobs by providing the finest MongoDB tools on the market. We guarantee the best compatibility with current and legacy releases of MongoDB, continue to deliver new features with every new software release, and provide high quality support.

Find us on FacebookFind us on TwitterFind us on YouTubeFind us on LinkedIn

Education

  • Free MongoDB Tutorials
  • Connect to MongoDB
  • Connect to MongoDB Atlas
  • Import Data to MongoDB
  • Export MongoDB Data
  • Build Aggregation Queries
  • Query MongoDB with SQL
  • Migrate from SQL to MongoDB

Resources

  • Feedback and Support
  • Sales Support
  • Knowledge Base
  • FAQ
  • Reports
  • Case Studies
  • White Papers
  • Testimonials
  • Discounts

Company

  • About Us
  • Blog
  • Careers
  • Legal
  • Press
  • Privacy Policy
  • EULA

© 2022 3T Software Labs GmbH. All rights reserved.

  • Privacy Policy
  • Cookie settings
  • Impressum
When you click "Accept", you are agreeing to cookies being on your device. They may improve site navigation, site usage analysis, or the relevance of messages. It is up to you which cookies are enabled. Read our Privacy Policy.
Manage cookies
Accept
✕

Privacy Preference Center

A cookie is a small file of letters and numbers that is downloaded on to your computer when you visit a website. Cookies are used by many websites and can do a number of things, eg remembering your preferences, recording what you have put in your shopping basket, and counting the number of people looking at a website. In the form below you can choose which cookies, except for essential cookies, to allow or disable.

Accept all cookies

Manage consent preferences

Essential cookies are strictly necessary to provide an online service such as our website or a service on our website which you have requested. The website or service will not work without them.

Performance cookies allow us to collect information such as number of visits and sources of traffic. This information is used in aggregate form to help us understand how our websites are being used, allowing us to improve both our website’s performance and your experience.

Functional cookies collect information about your preferences and choices and make using the website a lot easier and more relevant. Without these cookies, some of the site functionality may not work as intended.

Social media cookies are cookies used to share user behaviour information with a third-party social media platform. They may consequently effect how social media sites present you with information in the future.

Accept selected