Indexes and Unique Values

An index lets the database find rows by a column without reading the whole table, the way a book's index finds a page, a UNIQUE index makes it refuse a second row with the same email, and the sqlite3.IntegrityError it raises becomes an exception of your own that the rest of the app can understand.

By

Updated

Cheat sheet: Indexes and Unique Values
Category
FastAPI
Level
Journeyman
Tags
database, EXPLAIN QUERY PLAN, Index (database), Query Plan, sql, sqlite, sqlite3.IntegrityError, Table Scan, Unique Index