News for hackers. Stuff that matters.
Re:PostgreSQL 10 Released by derefr on Thursday October 05, 2017 @03:40PM (#15411994)
I've always wondered why there doesn't exist something like this, but architected like Apache's mod_security: something you run for a while in "training" mode to let it learn your usage patterns, which then spits out a hints file (in mod_security's case, a behaviour whitelist; in this case, a migration to add a set of indexes + views).

As a bonus, it could (like mod-security) also have a "production mode" where the DB consumes that hints file and applies the instructions in it as an overlay, rather than as a permanent patch to your schema; that way, you'd be able to re-train after changes and then swap out the hints in production by just swapping out the file and HUPping the DB server (which would hopefully do the least-time migration to turn the old indexes into the new indexes), rather than needing to scrub out all the old indexes before building new ones.

Re:PostgreSQL 10 Released by tatersolid on Sunday October 08, 2017 @04:58PM (#15429964)
This is also exactly what Microsoft SQL Server has done _since 2005_ with dynamic managements views. It shows on a running system what indexes would be optimal for an actual workload.
Re:PostgreSQL 10 Released by Drdrdrq on Thursday October 05, 2017 @04:32PM (#15412368)
It exists for MongoDB (Dex).