Materialized views

You can materialize a view to improve its performance.

Views can become slow as your data volume and the number of views stacked on top of one another grow. This happens because when doing a search, each view is computed on the fly. To improve the performance of a view, you can materialize it. Materializing pre-computes the view and stores it in memory, just like a table. You can expect a materialized view to be three to six times faster than a view that is not materialized, on average.

To materialize a view, you must have the Can administer ThoughtSpot privilege.

The number of materialized views you can create is limited to 50, because materialized views take up space in memory. Row Level Security does not apply to materialized views; all users see the same data when using the materialized view as a data source.

These are the operations you can do on a view:

After materializing, a view can have one of three statuses. You can see the status of a view by selecting Data, clicking Views, and finding your view in the list. The status is shown next to the name of your view.

Materialization status

A materialized view can be in one of the following states:

Queued

View is waiting to be materialized.

Action

Select Update status.

In Progress

View is being materialized.

Action

Select Update status. Wait for materialization to finish.

Materialized

View has been materialized into memory.

Action

You can now search the materialized view.

Stale

View has become out of sync with the data in the tables that make it up, usually due to an incremental data load.

Action

Refresh the view by selecting Refresh Data*.

Unknown

View status cannot be determined.

Action

Select Update status.

Error

An error occurred.

Action

Refresh the view by selecting Refresh Data*. Optionally. run a report.

Freshness of data

Your view can become stale, if it isn’t refreshed when the data in the tables used to create it is updated. There are two ways to refresh the data:

Here are some conditions that could lead to a view becoming stale:

  • Changes to the view definition

  • Changes to the fields used in the view

  • Changes to the join relationships used in the view

  • Change to formulas in the view

  • Change the datatypes in the underlying tables