public class RedshiftSyntax extends SqlSyntax
| Constructor and Description |
|---|
RedshiftSyntax() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
doesSupportTablePartitioning() |
void |
dropTable(String schema,
String tablename) |
boolean |
equals(Object obj) |
Collection<String> |
getCandidateJDBCDriverClassNames()
The drivers returned by methods are loaded explicitly by JdbcConnection (when it makes a JDBC
connection to the backend database.) This mechanism is to support legacy library that does not
support automatic JDBC driver discovery.
|
int |
getColumnNameColumnIndex() |
String |
getColumnsCommand(String schema,
String table) |
int |
getColumnTypeColumnIndex() |
String |
getFallbackDefaultSchema() |
String |
getPartitionByInCreateTable()
Documentation about SORTKEY:
https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_TABLE_NEW.html
|
String |
getPartitionCommand(String schema,
String table) |
String |
getQuoteString() |
String |
getSchemaCommand() |
int |
getSchemaNameColumnIndex() |
String |
getTableCommand(String schema) |
int |
getTableNameColumnIndex() |
boolean |
isAsRequiredBeforeSelectInCreateTable() |
String |
randFunction() |
getStddevPopulationFunctionName, quoteName, substituteTypeNamepublic boolean doesSupportTablePartitioning()
doesSupportTablePartitioning in class SqlSyntaxpublic Collection<String> getCandidateJDBCDriverClassNames()
SqlSyntaxgetCandidateJDBCDriverClassNames in class SqlSyntaxpublic int getColumnNameColumnIndex()
getColumnNameColumnIndex in class SqlSyntaxpublic String getColumnsCommand(String schema, String table)
getColumnsCommand in class SqlSyntaxpublic int getColumnTypeColumnIndex()
getColumnTypeColumnIndex in class SqlSyntaxpublic String getFallbackDefaultSchema()
getFallbackDefaultSchema in class SqlSyntaxpublic String getPartitionByInCreateTable()
If you do not specify any sort keys, the table is not sorted by default. You can define a maximum of 400 COMPOUND SORTKEY columns or 8 INTERLEAVED SORTKEY columns per table.
COMPOUND Specifies that the data is sorted using a compound key made up of all of the listed columns, in the order they are listed. A compound sort key is most useful when a query scans rows according to the order of the sort columns. The performance benefits of sorting with a compound key decrease when queries rely on secondary sort columns. You can define a maximum of 400 COMPOUND SORTKEY columns per table.
INTERLEAVED Specifies that the data is sorted using an interleaved sort key. A maximum of eight columns can be specified for an interleaved sort key.
An interleaved sort gives equal weight to each column, or subset of columns, in the sort key, so queries do not depend on the order of the columns in the sort key. When a query uses one or more secondary sort columns, interleaved sorting significantly improves query performance. Interleaved sorting carries a small overhead cost for data loading and vacuuming operations.
Important
Don’t use an interleaved sort key on columns with monotonically increasing attributes, such as identity columns, dates, or timestamps.
getPartitionByInCreateTable in class SqlSyntaxpublic String getPartitionCommand(String schema, String table)
getPartitionCommand in class SqlSyntaxpublic String getQuoteString()
getQuoteString in class SqlSyntaxpublic String getSchemaCommand()
getSchemaCommand in class SqlSyntaxpublic int getSchemaNameColumnIndex()
getSchemaNameColumnIndex in class SqlSyntaxpublic String getTableCommand(String schema)
getTableCommand in class SqlSyntaxpublic int getTableNameColumnIndex()
getTableNameColumnIndex in class SqlSyntaxpublic boolean isAsRequiredBeforeSelectInCreateTable()
isAsRequiredBeforeSelectInCreateTable in class SqlSyntaxpublic String randFunction()
randFunction in class SqlSyntaxCopyright © 2018 University of Michigan. All rights reserved.