Will the create index below scan the whole bucket or just the “landmark” collection in the “inventory” scope.
CREATE INDEX idx1 ON travel-sample.inventory.landmark(country)
I want to create scopes dynamically as such need to create indexes within the scope dynamically as well. The number of scopes created is large and I don’t want the system to suffer the rescan of the whole bucket every time a scope is created.
DDL, DMLs are specific to collection. i.e index only scan landmark collection with in the travel-sample bucket inventory scope.
CREATE INDEX idx2 ON travel-sample(country) is same as Within the bucket _default scope _default collection. It will not scan any other scope or collection with in the same bucket
CREATE INDEX idx2 ON travel-sample._default._default(country) ;
The bucket level once more backward compatibility , under neath all data moved to _default scope _default collection. All bucket level DML/DDLs uses mapped name internally.