Description
For testing purposes I wanted to create some scopes with many collections. I started with a clean database, and:
- created a bucket called 'test'
- created three scopes:
- scopeWith10Collections
- scopeWith100Collections
- scopeWith1000Collections
- I then ran the attached "createCollections.n1ql' file through cbq with a command like:
cbq -u Administrator -p password -f ~/createCollections.n1ql http://localhost:8093
|
After creating all these collection, and adding no data and no indexes, some metadata queries become extremely slow:
select indexes.* from system:indexes where state = "online";
|
takes 24 seconds to run on my machine, even though it returns no documents. I can get the indexes from the REST API (/indexStatus) in a fraction of a second.
select * from system:keyspaces;
|
can take over a minute, up to almost 5 minutes. I'm not sure why these queries are taking so long, since in my browser code I can get the same information from the ns_server REST API in much less time.
Because of this slow performance, I had to change the query workbench to use the ns_server REST API to get the metadata, since the n1ql queries were unusably slow.
Attachments
Issue Links
- Clones
-
MB-42753 query engine becomes very slow after creating many collections
- Closed