Loading topic
SELECT, WHERE, ORDER BY and JOIN queries. It also assumes you know what rows, columns and primary keys are, and that you can tell linear growth from logarithmic growth. The examples use PostgreSQL syntax. The ideas carry over to MySQL, SQL Server and Oracle6 min readEXPLAIN plan. The examples use PostgreSQL syntax and the orders table from earlier in this tutorial.6 min readEXPLAIN output and know that a B-tree keeps its keys in sorted order. It also assumes you know the difference between a point lookup and a range scan. Examples use PostgreSQL syntax, and the same ideas apply to MySQL and most other B-tree databases.6 min readEXPLAIN plan and know how a B-tree index finds a value or a range. It also assumes you know how a composite index orders its columns. The examples use PostgreSQL syntax.5 min readEXPLAIN output. It covers how a table's rows relate to its indexes. That relationship decides how many steps a lookup takes and how much an index costs to maintain.6 min readEXPLAIN output, know how a B-tree index finds rows, and understand the difference between a clustered index and a secondary index. Examples use PostgreSQL syntax.6 min readEXPLAIN output. Earlier chapters covered how indexes speed up reads. Here we look at the price. Every index is a second copy of some of your data, and the database must keep that copy correct on every write.6 min readEXPLAIN output, know how a B-tree index serves point lookups and range scans, and understand why predicates must leave the indexed column bare. The examples use PostgreSQL syntax. Both features also exist in SQLite. MySQL 8.0 supports expression indexes (cal7 min readEXPLAIN output. Examples use PostgreSQL syntax. Other databases offer some of these types under different names, and the chapter notes where.5 min readEXPLAIN output, know how B-trees and composite indexes work, and understand the write c6 min readEXPLAIN plan, and understand B-tree lookups, composite indexes with the leftmost-prefix rule, covering indexes, and the write cost of maintaining indexes. It pulls those pieces into a repeatable method for deciding which indexes to create. The e6 min read