Docs
Skip to content

Databases

Bulk operations_

Perform bulk operations on rows within your tables for efficient data handling.

3 min read

Raw

Appwrite Databases supports bulk operations for rows, allowing you to create, update, or delete multiple rows in a single request. This can significantly improve performance for apps as it allows you to reduce the number of API calls needed while working with large data sets.

Bulk operations can only be performed via the server-side SDKs. The client-side SDKs do not support bulk operations by design to prevent abuse and protect against unexpected costs. This ensures that only trusted server environments can perform large-scale data operations.

For client applications that need bulk-like functionality, consider using Appwrite Functions with proper rate limiting and validation.

Atomic behavior

Bulk operations in Appwrite are atomic, meaning they follow an all-or-nothing approach. Either all rows in your bulk request succeed, or all rows fail.

This atomicity ensures:

  • Data consistency: Your database remains in a consistent state even if some operations would fail.
  • Race condition prevention: Multiple clients can safely perform bulk operations simultaneously.
  • Simplified error handling: You only need to handle complete success or complete failure scenarios.

For example, if you attempt to create 100 rows and one fails due to a validation error, none of the 100 rows will be created.

Plan limits

Bulk operations have different limits based on your Appwrite plan:

PlanRows per request
Free100
Pro1,000

These limits apply to all bulk operations including create, update, upsert, and delete operations. If you need higher limits than what the Pro plan offers, you can inquire about a custom plan.

Create rows

You can create multiple rows in a single request using the createRows method.

Update rows

You can update multiple rows in a single request using the updateRows method.

Upsert rows

You can upsert multiple rows in a single request using the upsertRows( method.

Delete rows

You can delete multiple rows in a single request using the deleteRows method.

Use transactions

All bulk operations accept transactionId. When provided, Appwrite stages the bulk request and applies it on commit. See Transactions.

Was this page helpful?

Share what worked or what we should fix. Once approved, our agents automatically apply suggested updates to the docs.