Why is index creation so slow?

Running a single node server on a 16GB memory machine. The index creation takes about 18-20 seconds on a bucket with ~70000 documents. The same index on a bucket with 0 documents is taking about 10-12 seconds. Is this normal?
I want to understand the internals of index creation process; if someone can explain or point me to some resource, it’ll be of great help. Thank you.

“The same index on a bucket with 0 documents is taking about 10-12 seconds”

What are you measuring? If you are measuring what you observe in the web-ui, then the time would only be an indication of when the ui updates.

Here is the documentation on index creation Create Indexes | Couchbase Docs.
The internals of index creation are not published as they are internal. They may differ from version to version and between flavors (community vs enterprise). There is no specification of how they create indexes, only that the create indexes.

@mreiche Thank you for responding. I’m actually using a Java program to measure it.

And what are you measuring? Please show the code.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.