Chapter 2. Command-line Operations and Indexes

In this chapter, we will cover the following topics:

  • Creating test data
  • Performing simple querying, projections, and pagination from the Mongo shell
  • Updating and deleting data from the shell
  • Creating an index and viewing plans of queries
  • Creating a background and foreground index in the shell
  • Creating and understanding sparse indexes
  • Expiring documents after a fixed interval using the TTL index
  • Expiring documents at a given time using the TTL index

Introduction

In this chapter we will be performing simple queries using the mongo shell. Later in the chapter, we will have a detailed look at commonly used MongoDB indexes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset