Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Database
  • Getting started
    • Overview
    • Create databases
    • Examples of YQL queries
    • Examples of operations in the YDB CLI
    • Launch a test app
    • Document API
    • Developing in NodeJS through the Document API
  • Step-by-step instructions
    • Database management
    • How to connect to a database
    • Table management
    • Reading and writing data
    • Working with secondary indexes
  • Working with the SDK
  • Concepts
    • Overview
    • Data model and schema
    • Serverless and Dedicated operation modes
    • Data types
    • Transactions
    • Secondary indexes
    • Time to Live (TTL)
    • Terms and definitions
    • Quotas and limits
  • Access management
  • Pricing policy
    • Overview
    • Serverless mode
    • Dedicated mode
  • Recommendations
    • Schema design
    • Partitioning tables
    • Secondary indexes
    • Paginated output
    • Loading large data volumes
    • Using timeouts
  • YDB API and API reference
    • Database limits
    • Handling errors in the API
  • Amazon DynamoDB-compatible HTTP API
    • API reference
      • All methods
      • Actions
        • BatchGetItem
        • BatchWriteItem
        • CreateTable
        • DeleteItem
        • DeleteTable
        • DescribeTable
        • GetItem
        • ListTables
        • PutItem
        • Query
        • Scan
        • TransactGetItems
        • TransactWriteItems
        • UpdateItem
      • Common errors
  • YQL reference guide
    • Overview
    • Data types
      • Simple
      • Optional
      • Containers
      • Special
    • Syntax
      • Unsupported statements
      • For text representation of data types
      • Expressions
      • CREATE TABLE
      • DROP TABLE
      • INSERT INTO
      • UPSERT INTO
      • REPLACE INTO
      • UPDATE
      • DELETE
      • SELECT
      • GROUP BY
      • JOIN
      • FLATTEN
      • ACTION
      • DISCARD
      • PRAGMA
      • DECLARE
      • OVER, PARTITION BY, and WINDOW
    • Built-in functions
      • Basic
      • Aggregate
      • Window
      • For lists
      • For dictionaries
      • For JSON
      • For structures
      • For types
    • Preset user-defined functions
      • HyperScan
      • Pcre
      • Pire
      • Re2
      • String
      • Unicode
      • Datetime
      • Url
      • Ip
      • Digest
      • Math
      • Histogram
    • For text representation of data types
  • YQL tutorial
    • Overview
    • Creating a table
    • Adding data to a table
    • Selecting data from all columns
    • Selecting data from specific columns
    • Sorting and filtering
    • Data aggregation
    • Additional selection criteria
    • Joining tables by JOIN
    • Data insert and update by REPLACE
    • Data insert and update by UPSERT
    • Data insert by INSERT
    • Data update by UPDATE
    • Deleting data
    • Adding and deleting columns
    • Deleting a table
  • Maintenance
    • Backups
  • Diagnostics
    • System views
  • Questions and answers
    • General questions
    • Errors
    • YQL
    • All questions on the same page
  • Public materials
  1. YDB API and API reference
  2. Database limits

Database limits

  • Schema object limits
  • Size limits for stored data
  • Limits that apply when executing queries

This section describes the parameters of limits set in YDB.

Schema object limits

The table below shows the limits that apply to schema objects: tables, databases, and columns. The_Object_ column specifies the type of schema object that the limit applies to.
The Error type column shows the status that the query ends with if an error occurs. For more information about statuses, see Error handling in the API.

Table 1: Schema object limits

Objects Limit Value Explanation             Internal
name
Error
type
Database Maximum path depth 32 Maximum number of nested path elements (directories, tables) MaxDepth SCHEME_ERROR
Database Maximum number of paths (schema objects) 200,000 Maximum number of path elements (directories, tables) in the database MaxPaths GENERIC_ERROR
Database Maximum number of tablets 200,000 Maximum number of tablets (table shards and system tablets) that can run in the database. An error is returned if a query to create, copy, or update a table exceeds this limit. When the maximum number of tablets in the database is reached, no automatic table sharding is performed MaxShards GENERIC_ERROR
Database Maximum object name length 255 Limits the number of characters in the name of a schema object, such as a directory or table MaxPathElementLength SCHEME_ERROR
Database Maximum ACL size 10 KB Maximum total size of all access control rules that can be saved for a single schema object MaxAclBytesSize GENERIC_ERROR
Directory Maximum number of objects 100,000 Maximum number of tables and child directories created in a directory MaxChildrenInDir SCHEME_ERROR
Table Maximum number of table shards 35,000 Maximum number of table shards MaxShardsInPath GENERIC_ERROR
Table Maximum number of columns 200 Limits the total number of columns in a table MaxTableColumns GENERIC_ERROR
Table Maximum column name length 255 Limits the number of characters in the name of a column MaxTableColumnNameLength GENERIC_ERROR
Table Maximum number of columns in a primary key 20 Each table must have a primary key. The number of columns in the primary key may not exceed this limit MaxTableKeyColumns GENERIC_ERROR
Table Maximum number of indexes 20 Maximum number of indexes other than the primary key index that can be created in a table MaxTableIndices GENERIC_ERROR
Table Maximum number of slaves 3 Maximum number of read-only replicas that can be specified when creating a table with slaves MaxSlavesCount GENERIC_ERROR
Table Maximum number of tables to copy 1000 Limit on the size of the list of tables for persistent table copy operations MaxConsistentCopyTargets GENERIC_ERROR

Size limits for stored data

Table 2: Size limits for stored data

Parameter Value Error type
Maximum total size of all columns in a primary key 1 MB GENERIC_ERROR
Maximum size of a string column value 8 MB GENERIC_ERROR

Limits that apply when executing queries

The table below lists the limits that apply to query execution. The Call column specifies the public API call that will end with the error status specified in the Status column.

Table 3: Limits that apply when executing queries

Parameter Value Call Explanation Status
in case of
a violation
of the limit
Maximum number of rows in query results 1000 ExecuteDataQuery Complete results of some queries executed using the ExecuteDataQuery method may contain more rows than allowed. In this case, the maximum allowed number of rows will be returned in response to the query and the result will have the flag truncated SUCCESS
Maximum query result size 50 MB ExecuteDataQuery Complete results of some queries may exceed the set limit. In this case, the query fails and no data is returned PRECONDITION_FAILED
Maximum number of sessions per cluster node 1000 CreateSession Using the library for working with YDB, an application can create sessions within a connection. Sessions are linked to a node. You can create a limited number of sessions with a single node OVERLOADED
Maximum query text length 10 KB ExecuteDataQuery Limit on the length of YQL query text BAD_REQUEST
Maximum size of parameter values 50 MB ExecuteDataQuery Limit on the total size of parameters passed when executing a previously prepared query BAD_REQUEST
In this article:
  • Schema object limits
  • Size limits for stored data
  • Limits that apply when executing queries
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC