Skip to content

Instantly share code, notes, and snippets.

@stephencweiss
Created November 21, 2018 20:33
Show Gist options
  • Save stephencweiss/153a0d9652bb79d476ab1671952d3047 to your computer and use it in GitHub Desktop.
Save stephencweiss/153a0d9652bb79d476ab1671952d3047 to your computer and use it in GitHub Desktop.
Four common PostgreSQL shell commands related to indexes
CREATE INDEX <index_name> ON <table_name> (<field(s)>) # Add an index
DROP INDEX index_name; # Drop an index
\d <table_name>; # See all indexes on a table
\di; # See all indexes in a database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment