kinetica-query
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseKinetica SQL Dialect
Kinetica SQL 方言
Kinetica is a GPU-accelerated database with a PostgreSQL-compatible SQL dialect.
It handles billions of rows, vector search, geospatial, time-series, and graph analytics.
Critical: Kinetica SQL has important deviations from standard PostgreSQL.
Read references/kinetica-core-rules.md before writing any query.
Kinetica是一款GPU加速的数据库,兼容PostgreSQL SQL语法。
它支持处理数十亿行数据、向量搜索、地理空间、时间序列以及图分析。
重要提示:Kinetica SQL与标准PostgreSQL存在重要差异。
编写任何查询前请先阅读references/kinetica-core-rules.md。
Key Differences from PostgreSQL
与PostgreSQL的核心差异
- No nested aggregate functions — use subqueries or CTEs instead
- No backticks — use double quotes for identifiers
- /
DATEDIFFinstead of timestamp arithmeticDATEADD - Case-sensitive identifiers — always match exact column names
- not
DECIMALNUMERIC
- 不支持嵌套聚合函数——请改用子查询或CTE
- 不支持反引号——标识符请使用双引号包裹
- 请使用/
DATEDIFF代替时间戳算术运算DATEADD - 标识符大小写敏感——请始终与列名的精确大小写匹配
- 使用而非
DECIMALNUMERIC
Domain Capabilities
领域能力
SQL Core
SQL核心
See references/kinetica-core-rules.md — read this first.
See references/sql-functions.md for Kinetica-specific functions.
See references/sql-patterns.md for common query patterns.
请查看references/kinetica-core-rules.md——请优先阅读此文档。
Kinetica专属函数请查看references/sql-functions.md。
常见查询模式请查看references/sql-patterns.md。
DDL & DML
DDL & DML
CREATE TABLE with shard keys, partitioning, tier strategies, vector indexes.
LOAD DATA for bulk ingestion, EXPORT for data extraction, upsert hints.
See references/ddl-reference.md and references/dml-reference.md.
CREATE TABLE支持分片键、分区、分层策略、向量索引。
LOAD DATA用于批量导入,EXPORT用于数据导出,还有upsert提示。
请查看references/ddl-reference.md和references/dml-reference.md。
Geospatial
地理空间
ST_* and accelerated STXY_* functions, H3 spatial indexing, SRID 4326 only,
solution parameter (Euclidean/Haversine/Vincenty).
See references/geospatial-functions.md and references/geospatial-examples.md.
支持ST_以及加速的STXY_函数、H3空间索引,仅支持SRID 4326,支持解决方案参数(欧几里得/半正矢/文森特公式)。
请查看references/geospatial-functions.md和references/geospatial-examples.md。
Time-Series
时间序列
TIME_BUCKET, DATEDIFF/DATEADD, window functions, ASOF joins for temporal proximity.
See references/timeseries-functions.md and references/timeseries-examples.md.
支持TIME_BUCKET、DATEDIFF/DATEADD、窗口函数、用于时序邻近匹配的ASOF连接。
请查看references/timeseries-functions.md和references/timeseries-examples.md。
Vector Search & Embeddings
向量搜索与嵌入
Vector distance functions (L2, Cosine, Inner Product), GENERATE_EMBEDDINGS UDF,
and semantic search patterns.
See references/vector-patterns.md.
支持向量距离函数(L2、余弦、内积)、GENERATE_EMBEDDINGS UDF,以及语义搜索模式。
请查看references/vector-patterns.md。
JSON, Arrays & Text Search
JSON、数组与文本搜索
JSON_EXTRACT_VALUE (must CAST!), ARRAY_CONTAINS, UNNEST, REGEXP_LIKE, fuzzy matching.
See references/json-array-text.md.
支持JSON_EXTRACT_VALUE(必须显式CAST!)、ARRAY_CONTAINS、UNNEST、REGEXP_LIKE、模糊匹配。
请查看references/json-array-text.md。
Graph Analytics
图分析
Build property graphs from existing tables, query with Cypher, run algorithms
(shortest path, page rank, TSP). No separate graph database needed.
See references/graph-functions.md and references/graph-examples.md.
可基于现有表构建属性图,使用Cypher查询,运行相关算法(最短路径、页面排名、TSP),无需单独的图数据库。
请查看references/graph-functions.md和references/graph-examples.md。
UDFs, Procedures & ML
UDF、存储过程与ML
User-Defined Functions (Python), scheduled SQL procedures, built-in ML (PREDICT, OUTLIERS),
and Docker model management.
See references/udf-reference.md.
支持用户自定义函数(Python)、定时SQL存储过程、内置ML能力(PREDICT、OUTLIERS),以及Docker模型管理。
请查看references/udf-reference.md。
Query Writing Guidelines
查询编写指南
- Always check column names and types before writing SQL — Kinetica is case-sensitive
- Quote schema-qualified table names:
"schema"."table" - Use LIMIT for exploration queries
- Use CTEs instead of nested subqueries with aggregates
- For date math, always use DATEDIFF/DATEADD — never subtract timestamps directly
- When in doubt, consult the relevant reference file for the domain
- 编写SQL前请始终确认列名和类型——Kinetica大小写敏感
- 带schema的表名请加引号:
"schema"."table" - 探索性查询请使用LIMIT
- 带聚合的查询请使用CTE代替嵌套子查询
- 日期运算请始终使用DATEDIFF/DATEADD——切勿直接对时间戳做减法
- 如有疑问,请查阅对应领域的相关参考文件