Baron Schwartz

Recent Posts

Published by Baron Schwartz on Feb 15, 2019 11:22:15 AM

Databases, Shift-Left, and Empathy: What You Missed at DevOpsDays Charlotte

Last week several people from VividCortex traveled to attend DevOpsDays Charlotte, where I gave the opening keynote, we had a table to demonstrate our product, we caught up with friends and customers we haven't seen in a while, and last but certainly not least we shared in lots of DevOps conversations! Here's a recap of some highlights I enjoyed at the conference.

Read More
Published by Baron Schwartz on Feb 8, 2019 2:45:23 PM

Inspecting Index Usage In MySQL, PostgreSQL, and MongoDB

In my recent post about the Left-Prefix Index Rule, I explained how queries can use all or part of a compound (multi-column) index. Knowing what makes an index fully usable by a query is important, but it's also important to know how to figure out how much of an index a query is able to use. In this article I'll show you how to do this by reading the query's explain plan. This article covers MySQL, Postgres, and MongoDB.

Read More
Published by Baron Schwartz on Feb 5, 2019 11:29:13 AM

The Left-Prefix Index Rule

There's an important heuristic in database indexing that I call the left-prefix rule. It helps you understand whether the database will be able to make the best use of a multi-column index to speed up a query. It's one of a small handful of really important things to understand about indexes!


The left-prefix rule can be confusing, but once you grok it, it's simple and easy to use. It applies to MySQL, PostgreSQL, MongoDB, and many other databases. In this post I'll explain what the left-prefix rule means and how it works.

Read More
Published by Baron Schwartz on Feb 1, 2019 11:04:00 AM

Covering Indexes in MySQL, PostgreSQL, and MongoDB

A covering index is a fantastic query performance optimization. An index covers a query when the index has all the data needed to execute the query, so the server can retrieve the query’s data without reading any rows or documents. Covered queries are usually SELECT queries, but in addition to reads, indexes can cover portions of what a write query needs to do its work.

In this article I’ll explain what a covering index is in a bit more detail; the technical implementation and caveats in MySQL, PostgreSQL, and MongoDB; and how to check that a query is using a covering index.

Read More
Published by Baron Schwartz on Jan 28, 2019 2:36:00 PM

What is Concurrency in a Database?

Databases are confusing! Not only are they complicated bits of software, but database jargon is really complicated. Part of this comes from the number of words that have multiple meanings: depending on which community you spend time in, there are multiple meanings for words like schema, cluster, and even database.

Read More
Published by Baron Schwartz on Jul 30, 2018 1:47:27 PM

What is Cardinality in Monitoring?

I wrote a couple of “definitions and nuances” posts about terminology in databases recently (cardinality, selectivity), and today I want to write one about cardinality in monitoring, as opposed to cardinality in databases. If you’ve seen discussions of “high-cardinality dimensions” or “observability requires support for high-cardinality fields” this is what we’re talking about today. So what does it mean?

Read More

Recent Posts

Posts by Topic

see all