Migrating cosmos db from non partitioned collection to partitioned collection

Author: prkat

We are in the process of migrating cosmos db, from non partitioned collections to partitioned collections.

As part of the migration,

  • initially as first set of activity on application side c#/cosmos sdk related changed needs to be done which means "cross partition query" needs to be enabled for all non pointing queries
  • later as next set of activity on cosmos db side partitioned collections needs to be created along with data migration.

Since it is time consuming activity my management decided to do application side changes & db side changes at different date & time to minimize the production outage.

Question is, it is possible and it is ok? to run cross partitioned queries against non partitioned collection, please suggest if possible share me an query example which wont cause any performance issue.

Originally Sourced from: https://stackoverflow.com/questions/57947013/migrating-cosmos-db-from-non-partitioned-collection-to-partitioned-collection