> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Data Features ## Article: Data Platform Features ## Article Link: https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/limits-and-optimization/data-features.md ## Article Content: # Data Features All sites have different data capacities and resource needs. Data quotas apply to anything making data requests on a site, including the [CMS (Content Management System)](https://support.wix.com/en/article/about-the-content-manager-7160473), [Datasets](https://support.wix.com/en/article/about-datasets-6368396), and the Velo [Wix Data API](https://www.wix.com/velo/reference/wix-data). This article covers the data platform features that are available based on your [premium plan](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/premium-plans/about-premium-plans.md). Learn about the differences and [choose the plan](https://www.wix.com/upgrade/website) that's right for you. ## Data storage A site's collections and items are hosted by Wix, and there is a limit to the amount of data you can store on a site. This limit only applies to your collection items. ### Collection items Wix limits the total number of collection items a site can have. If a site reaches this limit, you won't be able to add any more data to any of your collections. The collection items limit is not applied to [Wix app collections](https://support.wix.com/en/article/content-manager-working-with-wix-app-collections) or [external database collections](https://support.wix.com/en/article/velo-adding-and-deleting-an-external-database-collection) connected to a site. It also doesn't apply to items in [sandbox collections](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing). Collection items can also include media or other files, which have [separate limits](https://support.wix.com/en/article/about-storage-and-bandwidth).
**Notes**: - If a site exceeds its storage quota and you delete data to free up space, it may take up to 1 hour before you can add new data to your collections. - There are also some [limits](https://support.wix.com/en/article/field-type-support-and-limitations-in-the-content-manager) that are specific to certain field types. - Collections in Blocks apps also affect a [site's collection item limit](https://support.wix.com/en/article/wix-studio-cms-limits-on-free-sites) depending if the app is private or public: - **Private Blocks apps**: Items in collections from private Blocks apps count towards the site's collection item quota. - **Public Blocks apps**: Items in collections from public Blocks apps, installed from the Wix App Market, don't count towards the site's collection item quota.
Downgrade behavior If you downgrade to a lower tier plan, the storage quota changes to the one defined by the new plan. If your site has more than this amount of data when you downgrade, none of your data is deleted. However, you can't add any new data to your site until you delete enough existing data to be below the quota.
### Optimize your data storage To avoid reaching the data storage limits, read about how to [optimize your data storage](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/limits-and-optimization/optimizing-your-code.md#storage). You can also [upgrade your plan](https://www.wix.com/upgrade/website) to receive a larger storage limit. ## Data requests Every time you access your data, whether that's to read or to write it, you are making a data request. Wix limits the frequency of your requests and the amount of time a request can take. ### Requests per minute Wix limits the number of data requests your site can make per minute. Once a site reaches this quota, subsequent requests during the same minute are not processed and return an error. There are separate quotas for read requests and write requests. The following API functions count as 1 request towards the read quota: - [`get`](https://www.wix.com/velo/reference/wix-data/get) - [`find`](https://www.wix.com/velo/reference/wix-data/wixdataquery/find) - [`count`](https://www.wix.com/velo/reference/wix-data/wixdataquery/count) - [`distinct`](https://www.wix.com/velo/reference/wix-data/wixdataquery/distinct) - [`aggregate`](https://www.wix.com/velo/reference/wix-data/aggregate) - [`isReferenced`](https://www.wix.com/velo/reference/wix-data/isreferenced) - [`queryReferenced`](https://www.wix.com/velo/reference/wix-data/queryreferenced) - [`include`](https://www.wix.com/velo/reference/wix-data/wixdataquery/include) - [`next`](https://www.wix.com/velo/reference/wix-data/wixdataqueryreferencedresult/next) - [`refresh`](https://www.wix.com/velo/reference/wix-data/wixdataqueryreferencedresult/next) - [`getItems`](https://www.wix.com/velo/reference/wix-dataset/dynamicdataset/getitems) (For newly requested items that are not currently in your cache.) The following API functions count as 1 request towards the write quota: - [`insert`](https://www.wix.com/velo/reference/wix-data/insert) - [`bulkInsert`](https://www.wix.com/velo/reference/wix-data/bulkinsert) - [`update`](https://www.wix.com/velo/reference/wix-data/update) - [`bulkUpdate`](https://www.wix.com/velo/reference/wix-data/bulkupdate) - [`save`](https://www.wix.com/velo/reference/wix-data/save) - [`bulkSave`](https://www.wix.com/velo/reference/wix-data/bulksave) - [`remove`](https://www.wix.com/velo/reference/wix-data/remove) - [`bulkRemove`](https://www.wix.com/velo/reference/wix-data/bulkremove) - [`insertReference`](https://www.wix.com/velo/reference/wix-data/insertreference) - [`removeReference`](https://www.wix.com/velo/reference/wix-data/removereference) - [`replaceReferences`](https://www.wix.com/velo/reference/wix-data/replacereferences) > **Note:** Each use of [include](https://www.wix.com/velo/reference/wix-data/wixdataquery/include) in a query counts towards the request quota. For example, the following query counts as 3 read requests: ```javascript wixData.query("Movies").include("director").include("studio").find(); ``` For each request that exceeds the quota, the request fails and the following error is displayed in [Wix Logs](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/developer-tools/logs/about-logs.md): `WDE0014: Requests per minute quota exceeded.` Learn more about [optimizing your data requests](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/limits-and-optimization/optimizing-your-code.md#data-requests) and [Wix Data error codes](https://dev.wix.com/docs/velo/apis/wix-data/error-codes.md). ### Request payload limits Wix Data limits the size of the request payloads. Single-item requests, such as [`update()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/update.md) or [`insert()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/insert.md), have a payload limit of 512 KB. Exceeding this limit results in a `WDE0009` error. Bulk operations, such as [`bulkUpdate()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/bulk-update.md) or [`bulkInsert()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/bulk-insert.md), have a total payload limit of 4 MB. Exceeding this limit results in a `WDE0109` error. Learn more about [Wix Data error codes](https://dev.wix.com/docs/sdk/backend-modules/data/wix-data-error-codes.md). ### Request timeout When your site makes a data request, it may take some time to receive a response. Wix Data places limits on how long a response can take before the request times out. If the response time exceeds this limit, Wix Data returns an error instead of the intended result. Request timeouts vary depending on your [Wix plan](https://www.wix.com/plans) and the type of collection you are attempting to access: | Collection Type | Wix plan | Timeout | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | ---------- | | [CMS collections](https://support.wix.com/en/article/cms-formerly-content-manager-managing-your-collections) | Free sites, premium sites (excl. Elite and Business Elites) | 5 seconds | | [CMS collections](https://support.wix.com/en/article/cms-formerly-content-manager-managing-your-collections) | Business Elite & Elite Premium | 10 seconds | | [External Database Collections](https://dev.wix.com/docs/develop-websites/articles/databases/external-databases/overview/integrating-external-databases-with-your-wix-site.md) | All plans | 15 seconds | After the specified timeout, the request fails and the following error message is displayed in [Wix Logs](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/developer-tools/logs/about-logs.md): `WDE0028: Operation time limit exceeded.` Learn more about [Wix Data error codes](https://dev.wix.com/docs/velo/apis/wix-data/error-codes.md). ### Blocks apps and request limits When a Blocks app is installed on a site, whether a private or a public app, data requests made by the app are subject to the site's requests per minute (RPM) limits, not the app's limits. ### Optimize your requests To avoid reaching the limits for data requests, read about how to [optimize your requests](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/limits-and-optimization/optimizing-your-code.md#data-requests). You can also [upgrade your plan](https://www.wix.com/upgrade/website) to receive larger limits for your data requests. ## Data management It's important to understand your database's infrastructure, how it affects data management, and how to use indexes to improve data requests. ### Database structure [Database collections](https://support.wix.com/en/article/content-manager-about-your-collection-fields) store dynamic content for a site, such as the content that displays on sites and site visitor generated content. Database collections for free and most premium sites are stored in large, multi-tenant databases. This doesn't mean that a site's data is exposed. It does mean that there are limits on the storage, read/write requests, and indexing resources available to a site. Database collections for sites with the Business Elite plan are stored in dedicated databases, providing them with significantly greater data resources. ### Data indexes A [database collection index](https://support.wix.com/en/article/velo-indexes-and-wix-data-collections) is a set of keys used to improve performance when searching for data in a database. Indexes can be created on a single collection field or multiple fields. Indexes are added to fields or sets of fields that are used most often when querying the collection to retrieve information. Collections can have 2 types of indexes: - **Regular:** These indexes improve retrieval performance as described above. - **Unique:** These are special indexes that improve performance and also enforce the uniqueness of values in the field that they're defined for. The Business Elite plan allows you to create a combination of unique or regular indexes up to the amount of indexes in the quota. Other plans include only 3 regular indexes and 1 unique index.
Downgrade behavior If you downgrade to a lower tier plan, the oldest indexes are maintained up to the new plan's quota. All other indexes on the site are deleted. If you downgrade to a free plan, all indexes are deleted.