DESIGNER_DESIGN_PROJECTION_ENCODINGS

Analyzes encoding in the specified projections, creates a script to implement encoding recommendations, and optionally deploys the recommendations.

Behavior Type

Immutable

Syntax

DESIGNER_DESIGN_PROJECTION_ENCODINGS ( '[ proj‑spec[,... ] ]', '[destination]' [, 'deploy'] [, 'reanalyze-encodings'] )

Parameters

proj‑spec[,...]

One or more comma-delimited projections to add to the design. Each projection can be specified in one of the following ways:

  • [[schema.]table.]projection
    Specifies to analyze projection.
  • schema.*
    Specifies to analyze all projections in the named schema.
  • [schema.]table
    Specifies to analyze all projections of the named table.

If set to an empty string, Vertica analyzes all projections in the database to which the user has access.

For example, the following statement specifies to analyze all projections in schema private, and send the results to the file encodings.sql:

=> SELECT DESIGNER_DESIGN_PROJECTION_ENCODINGS ('mydb.private.*','encodings.sql');
destination

Specifies where to send output, one of the following:

  • An empty string ('') writes the script to standard output.
  • The path and name of a SQL output file. If you specify a file that does not exist, the function creates one. If you specify only a file name, Vertica creates it in the catalog directory. If the file already exists, the function silently overwrites its contents.

deploy

Boolean that optionally specifies whether to deploy encoding changes, by default set to false.

reanalyze‑encodings

Boolean that optionally specifies whether DESIGNER_DESIGN_PROJECTION_ENCODINGS analyzes encodings in a projection where all columns are already encoded:

  • false (default): Analyzes no columns and generates no recommendations if all columns are encoded.
  • true: Ignores existing encodings and generates recommendations.

Privileges

The following requirements pertain to the target projections:

Examples

The following example requests that Database Designer analyze encodings of all projections in the schema online_sales, and save output to the file encodings.sql. The last parameter is omitted, so Database Designer does not execute the script:

=> SELECT DESIGNER_DESIGN_PROJECTION_ENCODINGS ('online_sales.*', 'encodings.sql');
 DESIGNER_DESIGN_PROJECTION_ENCODINGS 
--------------------------------------
 
(1 row)

See Also

Running Database Designer Programmatically