Skip to content
Tutorials Center
My learning

Topics

Lesson 27 of 35 ยท Performance and Pitfalls

Extracts and Performance Tuning in Tableau

Make slow Tableau dashboards fast: .hyper extracts, aggregation, incremental refresh, fewer marks and filters, calculation costs, and the Performance Recorder.

A dashboard that takes 40 seconds to load is a dashboard nobody opens. Tableau is fast by design, but a workbook can become slow in four places: the data (too many rows or a slow database), the query (too many fields and filters), the calculations (heavy table calculations and string work), and the rendering (too many marks and too many sheets on one dashboard). This lesson tackles them in that order, starting with the biggest lever: the extract.

Tableau does not run in this page, so steps are instructions. The code is a stand-in: small SQL and pandas experiments that demonstrate why a technique helps, such as why aggregating an extract shrinks it. Timings from a browser toy do not predict Tableau's speed, so the examples compare row counts and logic, not seconds.

Live vs. extract

A live connection sends a query to the source each time the view changes. An extract is a snapshot saved in Tableau's .hyper format, a columnar engine built for analytic queries (fast scans, aggregates and filters). Extracts usually win when the source database is slow, shared, or far away; live is right when you need real-time data, or when the database is purpose-built for fast queries and already has security you must reuse.

Create an extract by choosing Extract at the top right of the Data Source page and clicking Edit/Extract Data. Settings that matter:

  • Filters: keep only the rows you need (for example the last three years, or only active customers).
  • Aggregate data for visible dimensions: roll the data up to the dimensions used in the workbook.
  • Roll up dates to: Year, Quarter, Month, Day, or Hour, so a detailed timestamp is cut to the level you actually chart.
  • Number of rows: all, or a sample (good while you are developing).
  • Incremental refresh: the field that identifies new rows.

Why extracts are fast

Columnar Reads only the columns it needs.
Compressed Smaller files, less I/O.
Pre-aggregated Fewer rows to scan.
Local No wait for the source database.
1 / 2

Aggregating an extract

Suppose the source has one row per order line (100,000 of them), but the dashboard only shows sales by month and category. An aggregated extract stores one row per month and category instead. The stand-in shows the same operation on tiny data:

SQL What aggregating an extract does

Press Run (or Ctrl + Enter) to see the result here.

Eight source rows become five extract rows. With millions of lines and a monthly roll-up the ratio is dramatic. Note two limits. First, you can no longer drill to the order line, because that detail is gone. Second, non-additive aggregates cannot be recalculated: COUNTD of orders across several months from a monthly extract is wrong, because an order can appear in more than one row. Tableau still lets you use COUNTD, but it counts what is in the extract, so build the extract at the right grain.

Refreshing extracts

  • Full refresh rebuilds everything: safe, but slow for big data.
  • Incremental refresh adds only the rows whose increment field (usually an ID or a date) is greater than the maximum already stored. It does not pick up changes to old rows or deletions, so schedule an occasional full refresh as well (weekly, for instance).

The logic is a single comparison, and it shows the trap:

Python Incremental refresh and its blind spot

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The incremental extract misses the correction to row 2: 1,550 in the source against 1,500 in the extract. That is why a periodic full refresh is part of any incremental plan.

Speeding up queries and views

Most slow dashboards are slow because of the number and cost of queries they fire. Each sheet on a dashboard runs its own queries, so:

  1. Fewer sheets per dashboard. Six sheets is plenty; fifteen is slow and unreadable. Move detail to a second dashboard and link with an action.
  2. Fewer filters on the dashboard. Each quick filter queries the data to build its list of values. Use Only Relevant Values sparingly (it re-queries when other filters change), and prefer a Apply button for expensive multi-select filters.
  3. Avoid high-cardinality filters (a list of a million customer names). Use a wildcard search or a parameter.
  4. Fixed dashboard size. Automatic sizing rerenders for every window size and stops Tableau reusing cached results.
  5. Hide, don't filter, with sets and parameters only when they replace heavy filters, never as decoration.
  6. Use context filters or extract filters to cut the data early (see Order of Operations and Filter Pitfalls).

Speeding up calculations

  • Push logic to the data source. A calculated field is computed by the database on live connections and by the extract engine on extracts, both fast. Table calculations and LOOKUP/WINDOW_* run after the query, in Tableau, on the marks in the view: cheap for hundreds of marks, expensive for hundreds of thousands.
  • Prefer numbers and Booleans to strings. Comparing [Segment] = 'Consumer' is slower than a Boolean computed once in the data. Avoid heavy string parsing with REGEXP_*, CONTAINS or SPLIT on millions of rows; do it in the data pipeline.
  • Avoid ATTR, COUNTD and nested LOD stacks unless needed. COUNTD is the slowest common aggregation.
  • IF/CASE: put the most common condition first, avoid repeating a long expression, and use CASE for a single field's list of values.
  • Use a Boolean calc for a filter instead of a long list of OR conditions.
  • Materialise calculations in the extract. On Tableau Desktop, Extract > Compute Calculations Now stores simple row-level calculated fields in the extract so they are not recomputed for each query.

Reducing marks

Each mark is something the browser must draw. A map with 500,000 points and a table with 20,000 rows look unreadable and slow. Aggregate (map to counties, not addresses), use a Top N, or switch to a density or heat map. Fewer, meaningful marks are faster and easier to read. Also avoid very wide tables: scrolling 60 columns of detail is a data download, not a dashboard.

Measuring: the Performance Recorder

Do not guess; measure. In Tableau Desktop, Help > Settings and Performance > Start Performance Recording, then reproduce the slow action and Stop Performance Recording. Tableau opens a performance workbook listing events by duration: Executing Query, Computing Layouts, Computing Table Calculations, Geocoding, Connecting to Data Source, Compiling Query. The top bar tells you which of the four areas hurts:

  • Long Executing Query: data or query problem. Extract, aggregate, index the database.
  • Long Computing Layouts: too many marks or a complicated dashboard.
  • Long Table Calculations: moving logic to the data or reducing marks.
  • Long Connecting: network or credentials; consider an extract.

On Server and Cloud, administrators can see load times in Admin Views and the Performance dashboards, which show the slowest views.

A short checklist

Python Score a workbook against the checklist

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Turn the list into a habit: review the highest-scoring workbooks first, and re-run the Performance Recorder after each change so you know what really helped.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Why is an aggregated extract usually faster?

    Aggregating to the visible dimensions reduces the row count, and the engine has less to scan.
  2. 2. What does an incremental refresh NOT pick up?

    Incremental refresh only appends rows past the stored maximum of the increment field, so run a periodic full refresh.
  3. 3. In the Performance Recorder, a very long 'Computing Layouts' event most likely means:

    Layout computation depends on marks and layout complexity; query time is shown as Executing Query.
  4. 4. Which is usually the slowest common aggregation?

    COUNTD needs to track every distinct value, so it costs far more than simple sums or counts.

Summary

  • Use extracts with filters, aggregation and date roll-up to cut the row count; refresh incrementally with an occasional full refresh.
  • Reduce queries: fewer sheets and quick filters per dashboard, fixed sizes, no high-cardinality filters.
  • Keep calculations cheap: prefer row-level logic in the data, avoid COUNTD and string-heavy fields on big data, mind table calculations.
  • Reduce marks; measure with the Performance Recorder before and after each change.
  • The SQL and pandas stand-ins show row counts and refresh logic, not Tableau timings.

Next: Order of Operations and Filter Pitfalls