README.md in pgdexter-0.1.1 vs README.md in pgdexter-0.1.2

- old
+ new

@@ -1,9 +1,11 @@ # Dexter -An automatic indexer for Postgres +The automatic indexer for Postgres +[Read about how it works](https://medium.com/@ankane/introducing-dexter-the-automatic-indexer-for-postgres-5f8fa8b28f27) + ## Installation First, install [HypoPG](https://github.com/dalibo/hypopg) on your database server. This doesn’t require a restart. ```sh @@ -20,11 +22,11 @@ ```ini log_min_duration_statement = 10 # ms ``` -And install with: +And install the command line tool with: ```sh gem install pgdexter ``` @@ -48,15 +50,34 @@ 2017-06-25T17:52:22+00:00 Index found: ratings (rating) 2017-06-25T17:52:22+00:00 Index found: ratings (user_id) 2017-06-25T17:53:22+00:00 Processing 12 new query fingerprints ``` -To be safe, Dexter will not create indexes unless you pass the `--create` flag. +To be safe, Dexter will not create indexes unless you pass the `--create` flag. In this case, you’ll see: +```log +2017-06-25T17:52:22+00:00 Index found: ratings (user_id) +2017-06-25T17:52:22+00:00 Creating index: CREATE INDEX CONCURRENTLY ON ratings (user_id) +2017-06-25T17:52:37+00:00 Index created: 15243 ms +``` + ## Options -- `--interval` - time to wait between processing queries -- `--min-time` - only consider queries that have consumed a certain amount of DB time (in minutes) +Name | Description | Default +--- | --- | --- +exclude | prevent specific tables from being indexed | None +interval | time to wait between processing queries, in seconds | 60 +log-level | `debug` gives additional info for suggested indexes<br />`debug2` gives additional info for all processed queries | info +log-sql | log SQL statements executed | false +min-time | only process queries consuming a min amount of DB time, in minutes | 0 + +## Future Work + +[Here are some ideas](https://github.com/ankane/dexter/issues/1) + +## Thanks + +This software wouldn’t be possible without [HypoPG](https://github.com/dalibo/hypopg), which allows you to create hypothetical indexes, and [pg_query](https://github.com/lfittl/pg_query), which allows you to parse and fingerprint queries. A big thanks to Dalibo and Lukas Fittl respectively. ## Contributing Everyone is encouraged to help improve this project. Here are a few ways you can help: