Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Managed Service for YDB
  • Getting started
  • Access management
    • Overview
      • Serverless mode pricing policy
      • Query cost for YQL
      • Query cost for the Document API
      • Query cost for special APIs
      • Cost of topic operations
  • Monitoring metrics
  • Audit Trails events
  • FAQ
  • Public materials

In this article:

  • ReadTable
  • BulkUpsert
  • Building a secondary or vector index
  • Building a secondary index
  • Building a vector index
  1. Pricing policy
  2. Serverless mode
  3. Query cost for special APIs

Estimating the cost of requests to YDB via ad-hoc APIs

Written by
Yandex Cloud
Updated at April 24, 2026
  • ReadTable
  • BulkUpsert
  • Building a secondary or vector index
    • Building a secondary index
    • Building a vector index

ReadTableReadTable

The ReadTable operation allows you to efficiently read large ranges of data from a table. The request cost only depends on the amount of read data based on the rate of 128 request units (RUs) per MB. For cost calculation, the amount is rounded up to a multiple of 1 MB.

BulkUpsertBulkUpsert

BulkUpsert allows you to efficiently upload data to your database. The cost of writing a row using the BulkUpsert operation is 0.5 RUs per KB of written data. For cost calculation, the data amount is rounded up to a multiple of 1 KB. The total cost of the operation is calculated as the sum of costs for all written rows, with the result rounded up to the nearest integer.

Cost calculation example

Let’s assume you are writing 4 data rows of 2,500 bytes, 100 bytes, 1,200 bytes, and 1,024 bytes with the BulkUpsert operation.

The cost of such an operation is:

0.5 RUs × 3 + 0.5 RUs × 1 + 0.5 RUs × 2 + 0.5 RUs × 1 = 3.5 RUs

Total, rounded up to the nearest integer: 4 RUs

Where:

  • 0.5: Cost in RUs per KB of written data.
  • 3: Size of the first row in KB, rounded up (2,500 bytes = 1,024 bytes + 1,024 bytes + 452 bytes).
  • 1: Size of the second row in KB, rounded up.
  • 2: Size of the third row in KB, rounded up (1,200 bytes = 1,024 bytes + 176 bytes).
  • 1: Size of the fourth row in KB.

Building a secondary or vector indexBuilding a secondary or vector index

The cost of building an index equals the total cost of the following operations:

  • I/O operations whose cost includes the following:
    • Reading data from indexed and intermediate tables: ReadTable.
    • Writing data to indexed and intermediate tables: BulkUpsert.
  • For vector indexes, the cost also includes the consumption of CPU computing resources.

You can cancel index building, in which case the cost will include the actual processed data amount and resources consumed before the cancellation.

Building a secondary indexBuilding a secondary index

For a secondary index, the cost is calculated as the sum of costs for read operations from the indexed table and write operations to the index table.

Building a vector indexBuilding a vector index

For a vector index, the cost also accounts for its building nuances and increased consumption of computing resources.

For the vector_kmeans_tree type of vector index:

  • The total amount of read data is approximately $5 * ${levels} of the indexed table size, where levels is the number of index tree levels.
  • The total amount of written data is approximately $${levels} of the indexed table size.
  • Computing resource consumption includes all CPU usage time during all index building stages.

The final cost is determined as follows: you calculate the sum of data read/write (IO) operation costs and, separately, the CPU consumption cost, and then take the maximum one of these two values as the final cost of building the index.

Was the article helpful?

Previous
Query cost for the Document API
Next
Cost of topic operations
© 2026 Direct Cursus Technology L.L.C.