Before using the flash application scenario, we recommend that you read through this page to verify whether your version, scale, and SQL capabilities meet business requirements.
The integration boundaries (version, scale, and SQL capabilities) are subject to the provisions of this page. For operational limits such as the maximum number of rows written or queried at once and the maximum number of table fields, see Data operations. For connection pool parameters, see Connect to database by using json-table-sdk. Contextual notes in each feature topic still apply.
Prerequisites
- Use OceanBase AI Database V4.6.2.1 or later.
- When creating a client, you must set
use_namespace=True, create or obtain a Collection first, and then perform table creation and read/write operations. - Please access data through json-table-sdk. Do not directly read from or write to underlying physical tables, or manually modify the mapping tables automatically maintained by the SDK.
- For rules on Collection naming and the number of partitions (
partition_count), see Collection and app management.
Common error scenarios
Incorrect operation |
Result |
|---|---|
Not setting use_namespace=True |
The logical table usage of this scenario will not be used. |
| Starting to read or write after a Namespace is enabled but before a Collection is created | Throws ValueError. |
| Creating a Collection when the database version is earlier than V4.6.2.1 | Throws ValueError. |
Setting both use_namespace=True and index_columns |
Throws ValueError when the client is created. |
| Specifying a primary key or unique key when creating a table | Throws ValueError. |
Scale recommendations
Project |
Note |
|---|---|
| Number of Collections in a single database | There is no hard limit, but about 20 is recommended. |
Number of apps (app_prefix) |
Up to 10 million per Collection; a Namespace is automatically registered the first time an app_prefix is accessed. |
app_prefix length |
Up to 256 characters. |
| User tables under each app | Multiple user tables can be created under the same app (namespace), up to 100,000 tables. Exceeding this limit throws ValidationError. |
SQL capability scope
You can use this information to determine whether your business SQL can be implemented before integration:
Statement |
Note |
|---|---|
CREATE TABLE |
NOT NULL, DEFAULT, and COMMENT are available; primary keys, unique keys, foreign keys, indexes, and auto-increment columns are not supported. |
ALTER TABLE |
Only adding columns is supported, and the column must have a DEFAULT. |
INSERT |
Column names must be specified; INSERT ... SELECT, ON DUPLICATE KEY UPDATE, and REPLACE INTO are not supported. |
SELECT |
Supports common conditions, sorting, pagination, grouping, and JOINs between two tables within the same app (namespace), including self-joins. Does not support cross-app (namespace) JOINs, JOINs involving three or more tables, subqueries, UNION, DISTINCT, window functions, or hints. |
UPDATE / DELETE |
Adding a LIMIT is recommended; the operation affects only the current app and table. |
For details on the maximum number of rows per INSERT/SELECT statement, the maximum number of columns per ORDER BY/GROUP BY clause, the maximum number of columns per table, and the maximum row size, see Data operations.
Performance and concurrency
- For batch writes, processing 100 to 500 rows per batch is generally recommended. Higher throughput depends on the number of connections and parallelism. For more information, see Connect to database by using json-table-sdk.
- Pagination is recommended for complex queries. Before launching a new app, you can run
prewarm. For more information, see Collection and app management. - Avoid having a single client handle excessive continuous concurrency, performing high-frequency row-by-row
INSERToperations, scanning result sets without aLIMIT, or piling up too many collections in the same database.