Loading topic
EXPLAIN answers it. This chapter explains how to read a plan, how to tell estimates from measurements, and how BUFFERS shows the I/O behind a query's run time.7 min readEXPLAIN output, as covered in the previous chapter, and that you know SQL well enough to write WHERE, ORDER BY and LIMIT clauses. It covers how a B-tree index is laid out, which operators it supports, how it speeds up ordering, and the mistakes that st8 min readEXPLAIN output, as covered in the earlier chapters on the planner and on B-trees. It also assumes you know that a B-tree stores keys in sorted order and can answer =, <, >, BETWEEN, and ORDER BY requests. Here you will see four ways to shape a B-tr8 min readEXPLAIN output and know what a B-tree index is, as covered in the earlier chapters. You should also be comfortable creating tables and inserting rows in PostgreSQL. By the end you will know what a hash index stores, which queries it serves, which it cannot s7 min readLIKE, trigram search, and jsonb c7 min readEXPLAIN plan and know how a B-tree index works. It also assumes you are comfortable with jsonb, array, and tsvector columns. A B-tree maps one value to one row. That model breaks when a single column value holds many searchable parts, such as the keys 7 min readEXPLAIN plan and know how B-tree indexes work. It also assumes you are comfortable with CREATE EXTENSION and with PostgreSQL range types such as tstzrange. You will learn what a GiST index stores, which queries it speeds up, how nearest-neighbor orderi7 min readEXPLAIN (ANALYZE, BUFFERS) plan and know how a B-tree index serves range predicates. It also assumes you know that PostgreSQL stores table rows (the heap) in 8 kB pages. Earlier chapters covered both.7 min readEXPLAIN (ANALYZE, BUFFERS). It does not teach those again. It gives you a repeatable way to pick among them, and to decide whether to add an index at all.7 min read