doc and sql updates, adding indexes to db tables and clustering