To improve the performance of a view, you can materialize it. This operation computes the data for the view and stores it in memory, just like a table. You can expect a 3-6 times performance improvement on a materialized view over a view that is not materialized. However, materialized views take up space in memory, so weigh the tradeoffs and benefits of materializing a view ahead of time.
To materialize a view:
-
To find your view, click Data in the top menu, and choose Views.
-
Click the name of your view.
-
Click Schema.
-
If needed, add joins.
-
Under Materialization, click Materialize.
-
Fill in the details for primary key, sharding key, and number of shards.
Note: If you do not fill in the sharding details, the view will be replicated on every node of your cluster. If you’re not sure what to fill in, ask your ThoughtSpot administrator, or follow the links in this step to learn more about sharding. -
Click Materialize.
-
In the Schedule data updates dialog, select an option for Repeats (Monthly, Weekly, or Daily).
If you don’t want to set a schedule now, choose Setup later and skip to Step 11.
-
Fill in the schedule details:
-
Click Update.
-
You can see the status of the materialization as it progresses. Click Update status to refresh it.
-
When it says Materialized your materialized view is ready for search.
If after some time, the status has not changed to Materialized, check the list of statuses and corresponding actions to take.