To improve performance when working with extracts you can
optimize the extract. Optimizing an extract creates secondary structure in the extract that speed up future queries.

Optimize the extract by selecting a data source on the Data menu and then selecting
Extract > Optimize.

The following types of optimizations are made:

Materialized Calculated Fields

Calculated fields are computed in advance and stored in the extract. In future queries, Tableau can look up the already computed value rather than running the computation again. The following types of calculated fields ARE NOT materialized:

Calculations that use unstable functions such as NOW() and TODAY()

Calculations that use external functions such as RAWSQL and R

Table calculations

In addition, if the formula for a materialized calculation changes or the calculation is deleted from the data source, the materialized calculation is dropped from the extract until the extract is optimized again.

Acceleration Views

When a workbook contains filters that are set to show only relevant values, computing the available values for that filter can be an expensive query. For these filters, Tableau must evaluate the other filters in the workbook first and then compute the relevant values based on their filter selections. To speed up these queries, a view can be created that computes the possible filter values and caches them for faster lookup later.