Ever found yourself waiting around for a Tableau dashboard to load, wishing there were a magic fix? Unfortunately, there’s no single silver bullet that instantly turns a slow dashboard into a fast one. But by making a few targeted tweaks to your data source, you can gradually fine-tune performance and see real improvements. In this post, I’ll dive into eight practical tips to help you build more efficient data sources. Each little adjustment adds up, giving you faster load times and a more seamless user experience. Let’s go!
1. Utilize Hyper Extracts
Explanation
Unless your project absolutely requires a live connection to the data source, using an extract is the best choice for maximizing performance and efficiency. Hyper is optimized for analytics queries, almost always outperforming direct connections by a long shot.
Why It Matters
Faster Performance: offload processing from the data source to Tableau’s Hyper engine. Hyper is optimized for analytics and can execute up to 16 queries in parallel, compared to live connections with local files, which are often limited to one query at a time.
Version Control and Archiving: Extracts serve as time-stamped snapshots, ideal for tracking changes over time and maintaining historical records.
Offline Availability: Work offline without requiring constant connectivity to your data source.
Action Step
If near-real-time data isn’t necessary, schedule extract refreshes at intervals that keep data fresh while boosting efficiency.
2. Reduce Extract’s Size
Explanation
Filtering out unused rows or columns and aggregating data before creating an extract can dramatically reduce extract size, improve performance, and limit the data to what’s truly relevant.
Why It Matters
Lean extracts provide faster dashboard loads and simpler indexing in Tableau.
Action Steps
Remove rows by filtering data.
Remove columns by using “Hide All Unused Fields” option.
Aggregate data to a specified granularity by using Aggregate option.
3. Materialize Calculations
Explanation
When you materialize a calculation, Tableau can use the value in its queries instead of running a calculation. Tableau will automatically materialize calculations, wherever possible, when it builds an extract.
Why It Matters
Precomputing values can cut down on load times.
Actions Step
To materialize calculations added after the initial extract, go to Data > Extract > Compute Calculations Now
4. Utilize Relationships
Explanation
Tableau’s relationships let you only query what’s needed. This is different from physical joins, which can inflate your data if the granularity differs between tables.
Why It Matters
Optimized query execution: Relationships allow Tableau to generate optimized, context-aware queries based on the visualization needs.
Deferred joins: Tableau only queries the tables required for the specific visualizations in your worksheet, avoiding unnecessary joins.
Efficient aggregations and filtering: Tableau aggregates and filters data at the table level before joining it, which reduces the volume of data being processed.
Smaller data sources: Relationships avoid duplicating data by preserving the granularity of each table, unlike physical joins that inflate data size when granularity differs. For example, linking a table of daily transactions to a monthly budget table ensures that the budget is not unnecessarily repeated for every transaction, maintaining accuracy and reducing data size.
Action Step
A dashboard developer will find relationships especially useful for complex, multi-table models where you only want to query specific pieces of data at a time.
5. Join on Numeric Fields
Explanation
Whether using physical joins or relationships, aim to join tables on numeric fields whenever possible. Numeric comparisons streamline processing, especially for large datasets, and avoid potential mismatches due to formatting or casing in text fields.
Why It Matters
Numeric comparisons in Tableau are generally faster than string comparisons.
Action Step
When joining on numeric fields that are stored as text, for example CustomerID or OrderID, use INT([FieldName]) calculation in place of the joining field. An even better solution is to recast the field to numeric directly in the database.
6. Avoid Custom SQL
Explanation
Custom SQL allows you to write SQL queries directly against your underlying data source. However, Tableau incorporates Custom SQL as a subquery within every query it generates. This approach often results in lengthy, inefficient, and complex queries, example below:
Why It Matters
Complex queries reduce dashboard performance. Keeping your logic in the database often yields simpler, faster queries. A good alternative to Custom SQL is Initial SQL, if your database supports it. As the name suggests, Initial SQL runs only once when the workbook is first opened. It creates a temporary table, which Tableau can then treat like any other table. This approach can significantly enhance performance over Custom SQL.
Action Step
Consider building a lightweight view on the database side instead of embedding heavy logic in the workbook.
7. Embed Extracts
Explanation
When publishing to Tableau Server or Tableau Cloud, you can either publish an extract as a standalone data source or embed it within the workbook. If your data source is only used by one workbook, embedding that extract can reduce network hops and permissions overhead.
Why It Matters
Unless the extract is shared across multiple workbooks, embedding it in the workbook often offers distinct performance advantages:
Optimized for the workbook: Embedded extracts are tailored to the specific workbook, allowing Tableau to create temporary tables that improve the performance of dashboard elements.
Reduced network latency: Embedding the extract eliminates the need for round-trips over the network between the workbook and the data source.
Fewer permissions to manage: Embedded extracts eliminate the need for managing separate permissions for the data source, as access is controlled directly through the workbook.
Action Step
If multiple dashboards share the same source, weigh the benefits of a centralized published data source vs. embedding extracts in each workbook.
8. Utilize Server Caching
Explanation
To improve performance, Tableau Server caches the results of queries used to fetch data, so subsequent visits can reuse and return that cached data faster. By default, Tableau Server will cache and reuse data for as long as possible.
Why It Matters
A cached dashboard reduces the load time and improves user perceptions.
Action Step
When a user opens a workbook on Tableau Server/Cloud for the first time, the cache is populated, enabling faster load times for subsequent users. Cache warming is a technique to preload the workbook to populate the cache in advance, ensuring a smoother experience for the first and subsequent users. A simple method for cache warming is to create a subscription for your workbook. The subscription loads the dashboard to generate an email snapshot, populating the cache. Schedule it to run after data refreshes and before users access the dashboard.