You need to enable JavaScript to run this app.
导航
兼容性说明
最近更新时间:2024.08.22 10:29:50首次发布时间:2024.08.22 10:29:50

veDB MySQL 版本整个系统对 MySQL 完全兼容,在 OLAP 侧可以进行执行加速的数据类型、函数如下:

AP 侧支持的数据类型

类别数据类型
NumericTINYINT[(M)] [UNSIGNED] [ZEROFILL]
BOOL, BOOLEAN
SMALLINT[(M)] [UNSIGNED] [ZEROFILL]
MEDIUMINT[(M)] [UNSIGNED] [ZEROFILL]
INT[(M)] [UNSIGNED] [ZEROFILL]
INTEGER[(M)] [UNSIGNED] [ZEROFILL]
BIGINT[(M)] [UNSIGNED] [ZEROFILL]
DECIMAL[(M[,D])] [UNSIGNED] [ZEROFILL]

DEC[(M[,D])] [UNSIGNED] [ZEROFILL]
NUMERIC[(M[,D])] [UNSIGNED] [ZEROFILL]
FIXED[(M[,D])] [UNSIGNED] [ZEROFILL]

FLOAT[(M,D)] [UNSIGNED] [ZEROFILL]
FLOAT(p) [UNSIGNED] [ZEROFILL]
DOUBLE[(M,D)] [UNSIGNED] [ZEROFILL]

DOUBLE PRECISION[(M,D)] [UNSIGNED] [ZEROFILL]
REAL[(M,D)] [UNSIGNED] [ZEROFILL]

Date & TimeDATE
DATETIME[(fsp)]
TIMESTAMP[(fsp)]
TIME[(fsp)]
YEAR[(4)]
String[NATIONAL] CHAR[(M)] [CHARACTER SET charset_name] [COLLATE collation_name]
[NATIONAL] VARCHAR(M) [CHARACTER SET charset_name] [COLLATE collation_name]
BINARY[(M)]
VARBINARY(M)
TINYBLOB
TINYTEXT [CHARACTER SET charset_name] [COLLATE collation_name]
BLOB[(M)]
TEXT[(M)] [CHARACTER SET charset_name] [COLLATE collation_name]
MEDIUMBLOB
MEDIUMTEXT [CHARACTER SET charset_name] [COLLATE collation_name]
LONGBLOB
LONGTEXT [CHARACTER SET charset_name] [COLLATE collation_name]
JSONJSON

AP 侧支持的字符集与排序

字符集描述对应默认字符集排序字符集排序
binaryBinary pseudo charsetbinarybinary
latin1cp1252 West Europeanlatin1_swedish_cilatin1_swedish_ci
utf8mb3UTF-8 Unicodeutf8_general_ciutf8mb3_bin
utf8mb3_general_ci
utf8mb4UTF-8 Unicodeutf8mb4_0900_ai_ciutf8mb4_0900_ai_ci
utf8mb4_bin
utf8mb4_general_ci

AP 侧支持的函数

函数类别函数
Numeric%, MOD
*
+
- (减法)
- (负数)
/
DIV
ABS(X)
ACOS(X)
ASIN(X)
ATAN(X)
CEIL(X)
CEILING(X)
COS(X)
DEGREES(X)
EXP(X)
FLOOR(X)
LN(X)
LOG(X), LOG(B,X)
LOG10(X)
LOG2(X)
MOD(N,M), N % M, N MOD M
PI()
POW(X, Y)
POWER(X, Y)
RADIANS(X)
RAND([N])
ROUND(X),ROUND(X,D)
SIGN(X)
SIN(X)
SQRT(X)
TAN(X)
TRUNCATE(X,D)

Date & Time

ADDDATE(date,INTERVAL expr unit)
ADDDATE(date,days)

CONVERT_TZ(dt,from_tz,to_tz)
DATEDIFF(expr1,expr2)

DATE_ADD(date,INTERVAL expr unit)
DATE_SUB(date,INTERVAL expr unit)

DATE_FORMAT(date, format)
DATE_SUB(date,INTERVAL expr unit)
DAY(date)
DAYNAME(date)
DAYOFMONTH(date)
DAYOFWEEK(date)
DAYOFYEAR(date)
EXTRACT(unit FROM date)
FROM_DAYS(N)
FROM_UNIXTIME(unix_timestamp[,format])
HOUR(time)
LAST_DAY(date)
MINUTE(time)
MONTH(date)
MONTHNAME(date)
QUARTER(date)
SECOND(time)

SUBDATE(date,INTERVAL expr unit)
SUBDATE(expr,days)

TIMESTAMPADD(unit,interval,datetime_expr)
TIMESTAMPDIFF(unit,datetime_expr1,datetime_expr2)
TO_DAYS(date)
TO_SECONDS(expr)
UNIX_TIMESTAMP([date])
WEEK(date[,mode])
WEEKDAY(date)
WEEKOFYEAR(date)
YEAR(date)
YEARWEEK(date), YEARWEEK(date,mode)

Flow Control

CASE value WHEN compare_value THEN result [WHEN compare_value THEN result ...] [ELSE result] END
CASE WHEN condition THEN result [WHEN condition THEN result ...] [ELSE result] END

IF(expr1,expr2,expr3)
IFNULL(expr1,expr2)
NULLIF(expr1,expr2)
StringASCII(str)
BIN(N)
CHAR(N,... [USING charset_name])
CHAR_LENGTH(str)
CHARACTER_LENGTH(str)
CONCAT(str1,str2,...)
CONCAT_WS(separator,str1,str2,...)
FIND_IN_SET(str,strlist)

HEX(str)
HEX(N)

INSTR(str,substr)
LCASE(str)
LEFT(str,len)
LENGTH(str)

expr LIKE pat [ESCAPE 'escape_char']
expr NOT LIKE pat [ESCAPE 'escape_char']

LOCATE(substr,str)
LOCATE(substr,str,pos)

LOWER(str)
LPAD(str,len,padstr)
LTRIM(str)
MID(str,pos,len)
OCTET_LENGTH(str)
POSITION(substr IN str)

expr REGEXP pat
expr NOT REGEXP pat

REGEXP_INSTR(expr, pat[, pos[, occurrence[, return_option[, match_type]]]])
REGEXP_LIKE(expr, pat[, match_type])
REGEXP_REPLACE(expr, pat, repl[, pos[, occurrence[, match_type]]])
REGEXP_SUBSTR(expr, pat[, pos[, occurrence[, match_type]]])
REPEAT(str,count)
REPLACE(str,from_str,to_str)
REVERSE(str)
RIGHT(str,len)

expr RLIKE pat
expr NOT RLIKE pat

RPAD(str,len,padstr)
RTRIM(str)
SOUNDEX(str)
expr1 SOUNDS LIKE expr2
SPACE(N)
STRCMP(expr1,expr2)

SUBSTR(str,pos)
SUBSTR(str FROM pos)
SUBSTR(str,pos,len)
SUBSTR(str FROM pos FOR len)

SUBSTRING(str,pos)
SUBSTRING(str FROM pos)
SUBSTRING(str,pos,len)
SUBSTRING(str FROM pos FOR len)

SUBSTRING_INDEX(tr,delim,count)

TRIM([{BOTH
TRIM([remstr FROM] str)

UCASE(str)
UPPER(str)

Cast

CAST(expr AS type [ARRAY])
CAST(timestamp_value AT TIME ZONE timezone_specifier AS DATETIME[(precision)])

CONVERT(expr USING transcoding_name)
CONVERT(expr,type)

JSONcolumn->path
JSON_CONTAINS(target, candidate[, path])
JSON_EXTRACT(json_doc, path[, path] ...)
JSON_KEYS(json_doc[, path])
JSON_LENGTH(json_doc[, path])
JSON_UNQUOTE(json_val)
JSON_VALID(val)
AggregationAVG([DISTINCT] expr) [over_clause]
COUNT(expr) [over_clause]
COUNT(DISTINCT expr,[expr...])
GROUP_CONCAT(expr)
JSON_ARRAYAGG(col_or_expr) [over_clause]
MAX([DISTINCT] expr) [over_clause]
MIN([DISTINCT] expr) [over_clause]
STD(expr) [over_clause]
STDDEV(expr) [over_clause]
STDDEV_POP(expr) [over_clause]
STDDEV_SAMP(expr) [over_clause]
SUM([DISTINCT] expr) [over_clause]
VAR_POP(expr) [over_clause]
VAR_SAMP(expr) [over_clause]
VARIANCE(expr) [over_clause]