Skip to content

Instantly share code, notes, and snippets.

@frodsan
frodsan / 01_seq_scan.md
Last active December 6, 2018 13:13
SQL Indices

Sequential scans:

When the optimizer can't find an index for a query, this results in full table scan (or sequential scan). A Sequential scan will read each row of the entire table to check if the given conditions meet.

Table = [
  # List of rows
]

Row = Struct.new(:id, :first_name, :last_name)