Testing: Enterprise 4.1 Server running on a Linux Box and using C# console app.
I am testing a bucket with server log files. The bucket has about 3.5 million documents. Trying to delete about a million docs for a certain day at this rate will probably take a week or 2. I am using an index on type and N1QL statements. I reduced the test environment to a single server to simplify the test.
How can this “DELETE FROM logs WHERE type=‘LogDocument’ LIMIT 1000” be so slow on a bucket with only 3 million items of simple log files? I can try more complicated things like TTL with an ‘isdeleted’: true value and index it.
But my question is:
Is there a better way than using a single bucket and separating different documents by type=value? If there were separate tables I could just split days into different tables and drop the table. Seems like this issue could be a deal breaker.