This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
Gouache painting of an empty pantry shelf with dust outlines of missing jars, a broom, and one vermilion jar left on the floor.

MongoDB deleteMany: The Empty Filter That Deletes Everything

May 22, 2020
Pinal Dave
SQL Tips and Tricks
Database, MongoDB, NoSQL, SQL Scripts

MongoDB deleteMany removes every document that matches a filter, and an empty filter matches all of them. This post tests deleteOne, deleteMany, findOneAndDelete and the two quiet traps: a misspelled field and a filter built from an unset variable.

Read More
Gouache painting of a wall of small wooden card drawers with one vermilion drawer pulled open and a fresh card among older ones.

MongoDB updateOne: $set, $inc and Upserts Without Surprises

May 21, 2020
Pinal Dave
SQL Tips and Tricks
Database, MongoDB, NoSQL, SQL Scripts

MongoDB updateOne changes one document, and its result object shows how many documents matched and how many changed. This post tests $set, $inc, updateMany, upserts and the replaceOne mistake that wipes every other field.

Read More
Gouache painting of a farm produce stand with crates of vegetables, a brass magnifying glass on one crate and a vermilion basket of chosen tomatoes.

MongoDB find: Filters, Projections and Sorting for SQL People

May 20, 2020
Pinal Dave
SQL Tips and Tricks
Database, MongoDB, NoSQL, SQL Scripts

MongoDB find returns the documents that match a filter. This post tests find, findOne, $gt, $in, $and, $or, projection, sort, limit and countDocuments on 18 grocery products, each next to its SQL equivalent.

Read More
Gouache painting of a brass mail slot beside a tied bundle of envelopes, with one vermilion envelope sticking out at an angle.

MongoDB insertOne and insertMany: Adding Documents the Right Way

May 19, 2020
Pinal Dave
SQL Tips and Tricks
Database, MongoDB, NoSQL, SQL Scripts

MongoDB insertOne adds a document and insertMany adds a list. This post tests both with a unique index, a generated _id and a duplicate key in the middle of a batch, comparing ordered: true with ordered: false and showing what landed.

Read More
Gouache painting of open cardboard folders on a desk holding cards of different shapes, a brass key beside them and one vermilion folder.

Getting Started With mongosh: Databases, Collections and Documents

May 18, 2020
Pinal Dave
SQL Tips and Tricks
Database, MongoDB, NoSQL, SQL Scripts

mongosh is the shell that connects you to MongoDB. This post connects, creates a database and a collection on the first write, and stores a document. It explains the _id, the BSON types and the habits that surprise SQL Server people.

Read More
A small desk organizer holds neatly arranged pencils beside a plain adjustable reading lamp.

Ten SSMS Settings Worth Changing on Day One

April 29, 2019
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Scripts, SQL Server

Review ten SSMS settings for safer connections, clearer results, useful plans, and recoverable query text before starting your everyday work.

Read More
Three plain hourglasses with different sand levels stand beside a closed notebook on a wooden desk.

The Handful of Counters That Actually Matter

April 24, 2019
Pinal Dave
SQL Performance
Best Practices, Database, SQL Scripts, SQL Server

Make SQL Server monitoring useful by relating waits, batch activity, memory indicators, and file latency to the same workload and observation window.

Read More
Previous 1 2 3 4 5 … 52 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com