from Hacker News

Don't get bitten by missing foreign key indexes

by leontrolski on 7/15/21, 1:49 PM with 1 comments

  • by no-s on 7/15/21, 5:04 PM

    This audit can be constructed in many RDBMS. In SQL Server tracing there is warning for missing foreign key indexes needed for query plans, and stats are also kept for indexes so you can tell if the indexes are needed/used. I have a smorgasbord of audits to run on a server/database/schema to expose poor construction.