During FOSDEM PGDay I watched the "Indexes: The neglected
performance all-rounder" talk by Markus Winand. Both his talk and
the "SQL Performance Explained" book (which is also
online) are great.
The conclusion of the talk is that we should put more effort in carefully designing indexes. But how can we make sure the indexes are really used now and in the future? We need to write some tests for it.
So I wrote a small Python script to test …