check-fk-missing-index
v2.0.0
Published
Check foreign keys missing index
Downloads
1,675
Maintainers
Readme
Check foreign keys missing index
Check foreign keys missing index in Postgres
Why?
PostgreSQL automatically creates indexes on primary keys and unique constraints, but not on foreign keys.
So I created a command to find the columns that maybe are in need of an index. It's up to you.
Usage
npx check-fk-missing-index
Usage: check-fk-missing-index [options]
Options:
-V, --version output the version number
--format <format> Output format (choices: "table", "json", "minimal", default: "table")
--host <host> database server host or socket directory (default: "localhost")
--port <port> database server port (default: "5432")
--username <username> database user name (default: "postgres")
--database <dbname> database name to connect to (default: "postgres")
--password <password> database password (default: "")
--no-fail return code 0 on exit
-h, --help display help for command