I am evaluating Mongo db versus Couch base for use in storing historical financial data. As far as query speed and aggregation(group, sum etc) is concerned Couch base wins by a significant margin.
When a large body of data exists (30 -40 millions documents in a bucket), creating an index on Couch Base takes much longer than Mongo db.
Perhaps i am missing something when I create indexes on Couch Base.
I use "CREATE INDEX ix9 ON bucket(… fields…) USING GSI
Is this the correct way to create a new index when data already exists?
Couchbase bucket can have different unrelated type of documents. When you creating index you want based on same related type of documents. There are many different type of indexes, so you chose right index for queries
Once decide the index CREATE all Indexes in differed mode and then build all of them once so that it can use same DCP stream. Also checkout https://blog.couchbase.com/indexing-best-practices/ cc @deepkaran.salooja
Also, by default, index service is only going to use a small memory quota. You can provide a more reasonable memory quota (UI->Settings) for better indexing performance. Which couchbase version and index storage mode are you using?