Query Base Views
  • 21 Jun 2025
  • 2 minute read
  • Dark
    Light
  • PDF

Query Base Views

  • Dark
    Light
  • PDF

Article summary

🏔️ Summit 2025 Feature

Create custom query bases from materialized views.

A materialized view is a query that’s been configured to store the results of its execution in your database. Its data is refreshed on a schedule, rather than as the data changes, which makes them quicker to load—their data is cached and ready to go.

They’re often used in the context of exports to external analytics tools or in portals, but they can also be configured to create a new query base in your database from the view.

When you use a materialized view as a query base, you benefit from significantly reduced query execution times. Because the results of the query were done at the last scheduled export of the materialized view, the query doesn’t have to do any of the calculation itself: it just returns the result.

Creating a new query base from a materialized view

To create a new query base from a materialized view:

  1. Create a query and configure it as a materialized view.

  2. Add exports and filters. Exports here will be available as direct exports in queries on the new base.

  3. In the Schedule Export menu, select Enable query base for this view.

  4. Select Save.

When the query exports, Slate builds a new query base from the view.

Permissions for query base views

Like any query base, you can grant users, permissions, and roles access to it.

đź“– Further reading: Permissions

Querying on your new base

You can now access the exports you added to this view as a query on the new base.

The SQL used to generate the query references the view’s data. So, if subqueries involved a lot of calculation logic, it was done when the materialized view last exported. The query just has to fetch the end-result, which can reduce execution times on complex source queries from minutes to seconds.

📝 While you can technically also do this with a dynamic view, you won’t get any of the materialized view’s considerable performance benefits.

  1. Go to Queries / Reports.

  2. Select New Query or Quick Query.

  3. Configure the following settings:

    • Type: Configurable Joins

    • Category: Views

    • Base: Select the view (now a query base) you created earlier.

  4. Select Build Query.

  5. Add exports. The direct exports available to you here are the exports you created in the materialized view:

Joining from a custom base to a standard base

In a query on a custom base, you can access data from standard tables by joining back to a related base.

Joining from a standard base to a custom base

When you create a query on a standard base, like Person, and join to a base you’ve created from a materialized view, you access export values that have already been calculated. This lets you “cache” the contents of a query library, and can lead to significant performance improvements for large, complex queries.


Was this article helpful?