Seq to index
Without an index, Postgres reads every page of orders to find one customer's rows. An index on the filter column lets it jump straight to the matching rows.
task
Make SELECT * FROM orders WHERE customer_id = 77 use an index.
Run a query to see rows here.
Run EXPLAIN on the statement under the cursor: Plan tab, button Explain.
No tables yet.
Without an index, Postgres reads every page of orders to find one customer's rows. An index on the filter column lets it jump straight to the matching rows.
Make SELECT * FROM orders WHERE customer_id = 77 use an index.