A scramble is a special table used by VerdictDB to speed up query processing. The information about the created scrambles is stored in its metadata table and is used at query time.
Syntax for Creating Scrambles¶
CREATE SCRAMBLE newSchema.newTable FROM originalSchema.originalTable [SIZE sizeOfScramble] [BLOCKSIZE sizeOfBlock];
newSchemamay be identical to
newTablemust be different from
newSchemais same as
- The user requires the write privilege for the
newSchemaschema and the read privilege for the
sizeOfScramble(default = 1.0) defines the relative size of the scramble to its original table and must be a float value between 0.0 and 1.0 (e.g.,
sizeOfScramble=0.1will create a scramble which size is 10% of the original table).
- VerdictDB stores scrambles in a partitioned table and
sizeOfBlock(default = 1,000,000 = 1M) specifies the number of records in each partition. However, the maximum number of partitions for scrambles is 100 by default, and
sizeOfBlockwill be adjusted automatically by VerdictDB if the specified
sizeOfBlockresults in more than 100 partitions.
- The schema and table names can be quoted either using the double-quote (") or the backtick (`).
- The schema names, table names, column names, etc. in the queries issued by VerdictDB to the backend database are always quoted.
Syntax for Viewing Scrambles¶
This query will print the list of all scrambled tables that have been built.