![]() ![]() To follow along, run cockroach demo to start a temporary, in-memory cluster with the movr dataset preloaded: For more information about the MovR example application and dataset, see MovR: A Global Vehicle-sharing App. The following examples use MovR, a fictional vehicle-sharing application, to demonstrate CockroachDB SQL statements. New table: Cockroach Labs recommends that you use the IMPORT statement, as it performs better than INSERT. You can also use the IMPORT INTO statement to bulk-insert CSV data. In some cases, for example, when a table has no secondary indexes, single row INSERTs may perform best in terms of total system throughput. If a multi-row INSERT results in an error code 40001 with the message "transaction deadline exceeded", Cockroach Labs recommends that you break up the INSERT into smaller batches.Įxperimentally determine the optimal batch size for your application by monitoring the performance for different batch sizes (1, 10, 100, 1000) rows in an implicit transaction.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |