SQL Limitations

This topic specifies limitations for various values in Splice Machine SQL:

Database Value Limitations

The following table lists limitations on various database values in Splice Machine.

Value Limit
Maximum columns in a table 100000
Maximum columns in a view 5000
Maximum number of parameters in a stored procedure 90
Maximum indexes on a table 32767 or storage capacity
Maximum tables referenced in an SQL statement or a view Storage capacity
Maximum elements in a select list 1012
Maximum predicates in a WHERE or HAVING clause Storage capacity
Maximum number of columns in a GROUP BY clause 32677
Maximum number of columns in an ORDER BY clause 1012
Maximum number of prepared statements Storage capacity
Maximum declared cursors in a program Storage capacity
Maximum number of cursors opened at one time Storage capacity
Maximum number of constraints on a table Storage capacity
Maximum level of subquery nesting Storage capacity
Maximum number of subqueries in a single statement Storage capacity
Maximum number of rows changed in a unit of work Storage capacity
Maximum constants in a statement Storage capacity
Maximum depth of cascaded triggers 16

Date, Time, and TimeStamp Limitations

The following table lists limitations on date, time, and timestamp values in Splice Machine.

Value Limit
Smallest DATE value 0001-01-01
Largest DATE value 9999-12-31
Smallest TIME value 00:00:00
Largest TIME value 24:00:00
Smallest TIMESTAMP value 1677-09-21-00.12.44.000000
Largest TIMESTAMP value 2262-04-11-23.47.16.999999

Identifier Length Limitations

The following table lists limitations on identifier lengths in Splice Machine.

Identifier Maximum Number of Characters Allowed
Constraint name 128
Correlation name 128
Cursor name 128
Data source column name 128
Data source index name 128
Data source name 128
Savepoint name 128
Schema name 128
Unqualified column name 128
Unqualified function name 128
Unqualified index name 128
Unqualified procedure name 128
Parameter name 128
Unqualified trigger name 128
Unqualified table name, view name, stored procedure name 128

Numeric Limitations

The following lists limitations on the numeric values in Splice Machine.

Value Limit
Smallest INTEGER -2,147,483,648
Largest INTEGER 2,147,483,647
Smallest BIGINT -9,223,372,036,854,775,808
Largest BIGINT 9,223,372,036,854,775,807
Smallest SMALLINT -32,768
Largest SMALLINT 32,767
Largest decimal precision 31
Smallest DOUBLE -1.79769E+308
Largest DOUBLE 1.79769E+308
Smallest positive DOUBLE 2.225E-307
Largest negative DOUBLE -2.225E-307
Smallest REAL -3.402E+38
Largest REAL 3.402E+38
Smallest positive REAL 1.175E-37
Largest negative REAL -1.175E-37

String Limitations

The following table lists limitations on string values in Splice Machine.

Value Maximum Limit
Length of CHAR 254 characters
Length of VARCHAR 32,672 characters
Length of LONG VARCHAR 32,670 characters
Length of CLOB* 2,147,483,647 characters
Length of BLOB* 2,147,483,647 characters
Length of character constant 32,672
Length of concatenated character string 2,147,483,647
Length of concatenated binary string 2,147,483,647
Number of hex constant digits 16,336
Length of DOUBLE value constant 30 characters

* If you're using our 32-bit ODBC driver, CLOB and BLOB objects are limited to 512 MB in size, instead of 2 GB , due to address space limitations.