We’re starting a blog series dedicated to helping you improve the performance of Tableau in your environment. It all starts with the Best Practice Analyzer from Workbook Tools for Tableau. This feature lets you know exactly how you can improve your Tableau workbooks to run faster and smoother.
Each post in the series is related to specific performance issues that are flagged by the Best Practice Analyzer. If you don’t have it yet, get it. You can also check out more guidelines found on our Tableau Performance Checklist.
Conditional Logic Can Complicate Your Query
Your workbook has been flagged due to a calculated field using IF or CASE conditionals inside of functions that are being passed in a filter. This logic is creating a complex query that could be causing performance to deteriorate due to the potential of generating a nasty “where” clause within the filter.
Simplification Is Better
Most database engines will try to optimize each query it processes. Each uses a different algorithm for this, but (for the most part) they all have one thing in common. When the database encounters an overly complex query, it will simply pick the first query execution plan that will return correct results. This execution plan might not be the fastest or most optimal solution. Whenever possible, if you can simplify any query the database will process, you will get better results.
Don’t Ignore Indexes
Many database engines will not be able to take advantage of common optimization techniques if you use a lot of functions or if those functions are overly complex. For example, a best practice to achieve maximum performance would be to have an index on the fields in the query’s “where” clause. In many cases, indexes could be ignored completely if the field that has been indexed is being referenced by a function. Ignoring indexes can have a hugely negative impact on performance.
Below are some examples of calculations that would be flagged:
Curious about other Tableau workbook performance best practices? We have a growing list of posts to help you out. Here are the topics we’ve covered so far:
- Custom SQL Connections
- Automatic Dashboard Sizing
- Limit Calculated Field Length
- Context Filters
- Reduce Number of Dashboard Worksheets
- Images & Shapes
- Word Clouds
- Mixed Data Connections
- Quick Filter Cardinality
- Relevant Value Filters
- Row-Level Parameters
- Table Calculation in Level of Detail
- Teradata Initial SQL
- Unused Data Sources
- Blending Calculations
- Unused Columns