CockroachDB supports importing data from the following databases:
and from the following data formats:
This page lists general considerations to be aware of as you plan your migration to CockroachDB.
In addition to the information listed below, see the following pages for specific instructions and considerations that apply to the database (or data format) you're migrating from:
During migration, all of the features of
IMPORT that interact with external file storage assume that every node has the exact same view of that storage. In other words, in order to import from a file, every node needs to have the same access to that file.
In general, you are likely to have to make changes to your schema, and how your app interacts with the database. We strongly recommend testing your application against CockroachDB to ensure that:
- The state of your data is what you expect post-migration.
- Performance is as expected for your application's workloads. You may need to apply some best practices for optimizing SQL performance in CockroachDB.
Above a certain size, many data types such as
JSONB may run into performance issues due to write amplification. See each data type's documentation for its recommended size limits.
CockroachDB does not provide
SET data types.
In Postgres, you can emulate an
ENUM type using a
CHECK constraint as shown below. For MySQL, we perform this conversion automatically during the import.
> CREATE TABLE orders ( id UUID PRIMARY KEY, -- ... status STRING check ( status='processing' or status='in-transit' or status='delivered' ) NOT NULL, -- ... );