psql -d appdb -c "CREATE INDEX idx_users_email ON users (email);"
Create an index on a column
Builds a btree index on the email column so equality lookups skip full scans. Indexes speed reads but slow writes and consume disk, so create them for real query patterns. Check usage in pg_stat_user_indexes.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.