Views (normal) v1

Description

This page provides information about normal views in the database.

Most of the usual columns are absent - all the queries and I/O columns. This is because although I know which tables are in the view, I do not know which queries went to the view. I only know which tables queries go to. As such I can’t tell the difference between a query issued on the view, and a query which just happens to be issued on one of the tables used by the view. So I could produce the queries and I/O columns, for the tables which are used by the view, but I have no way of differentiating between the queries and I/O which is actually for the view, and that which is actually for tables in the view. The inability to differentiate makes the data worthless, so I’ve not produced the data.

Note the creation and age columns are missing, as Redshift does not store the creation time for a view.

  1. Limitations of the queries, store and I/O columns
  2. Volume of records
  3. Notes regarding views

Columns

Name Type
schema_id int8
schema varchar
view_id int8
view varchar
owner_user_id int4
owner varchar
length int4
counts:columns int8
counts:tables int8
store:blocks:sorted int8
store:blocks:unsorted int8
store:blocks:total int8
store:rows:sorted int8
store:rows:unsorted int8
store:rows:total int8
related pages varchar

Column Descriptions

schema_id

The schema ID. This column is emitted in CSV exports only.

schema

The schema name.

view_id

The view ID. This column is emitted in CSV exports only.

Surprisingly, view IDs turn out to be unique across all databases.

view

The view name.

owner_user_id

The owner user ID. This column is emitted in CSV exports only.

owner

The owner user name.

length

The length of the view text, in bytes.

counts:columns

The number of columns. Tables have system columns (there are three), and these are not included in the count.

counts:tables

The number of tables the view uses. Views can use other views; this count is the number of tables from all the views which are used.

store:blocks:sorted

The number of sorted blocks.

store:blocks:unsorted

The number of unsorted blocks.

store:blocks:total

The total number of blocks.

store:rows:sorted

The number of sorted rows.

store:rows:unsorted

The number of unsorted rows.

store:rows:total

The total number of rows.