We all know and love Tableau to be the best BI tool to enable you to quickly and easily see and understand your data. It enables fantastic ‘speed of thought’ analysis, super-fast data visualisation on giant data sets and is often heard in the same sentence with many other superlative prefixed buzzwords. But sometimes, just sometimes, you can get stuck in a rut with a slow workbook if you’ve been overzealous on the features or have configured things in the wrong way. This post is about what you can do to help get your viz back up to the ludicrous speed you expect.
There are several separate areas to focus on when looking to improve the performance of Tableau:
Is your data source up to it?
The bottom line is that a Tableau viz will only ever be as fast as the underlying datasource. It won’t magically turbo-boost an ageing relational database server or put a rocket up your warehouse derriere. Check your views and queries in the source first and if necessary, extract the data to a Tableau Data Extract (.tde). There’s much more info about why you should consider this option in this great article by Tom Brown.
Avoid using custom SQL
When you connect to multiple tables in your database, Tableau writes a query that has been optimised for that data source. Unless you are very experienced with join operation optimisation, writing custom SQL may cause Tableau’s connection to slow down.
Optimise those calculated fields
- Avoid string calculations if you can – they take much more computing time than mathematical operations
Use IIF(…) rather than IF … THEN …Correction: in Tableau 7, both ‘if’ variants evaluate both sides of the condition result – i.e. computes the ELSE side even when true and THEN side even when false. In Tableau 8 this is fixed so in fact IF should be faster than IIF. Apologies to anyone who changed anything based on this tip and thanks to JD and JM for pointing this out
- Avoid lots of CASE statements
- Use WINDOW_SUM rather than TOTAL
- Use MIN(…) rather than ATTR(…) when aggregating a dimension
- When nesting calculations, create calculated fields separately and then combine them in additional calculated fields
- If using an extract, ensure to send the row level calculations to the source by selecting ‘Optimize’
Take it easy on parameters and quick filters
Despite the name, too many quick filters will actually slow you down, particularly if you set them to use ‘Only Relevant Values’ and you’ve got lots of discrete lists. Try and more guided analytics approach and use action filters in within a dashboard instead. If you’re building a view with umpteen filters in it to make it super customizable, ask yourself whether multiple dashboards with different levels and themes would work better (hint: yes, it would)
Don’t over complicate views
Do you really need 50,000 marks on your scatterplot? Are you sure it’s readable? Roll it up and let the user drill down with actions. Don’t go for 10 charts on a dashboard at once, split them out and make use of storytelling across multiple views
Use the right granular level of data
If your database contains 10 years of data at a transactional level are you ever going to present all this fine detail in a viz all at once? Of course not. Pre-aggregate your data and roll it up to days or months.
Alternatively (or additionally) if you are interested in individual transactions then connect to your data with a context filter that only brings back relevant (e.g. the most recent 3 months) data to be used in your visualisation. Don’t forget that even a modest number of rows can be slow if you have column overkill, particularly columns with lots of unique items as this makes sorting slow
Use the latest version
Tableau spend oodles and oodles of cash on R&D and release updates all the time. These aren’t just for obscure bug fixes; they genuinely enhance functionality and speed. Take a look at the release notes to see what you’re missing. Version 8 will also bring plenty of performance enhancing goodies too so keep your eyes out for the release date (currently scheduled for some time in Q1 2013)
Check your server configuration
If your workbook works well in Tableau Desktop but is slow when you view it in Server, try these suggestions
- Make sure you’ve installed Server on a 64bit OS!
- Have a server dedicated for Tableau and make sure it’s not competing for resources with anything else
- Tableau Server can run on fairly modest hardware but of course, more is always better. Check the minimum recommended specifications on Tableau’s site here
- Ensure that you’re caching your data if you don’t need ‘live’ data
- Have your data source refreshes happen overnight or at times when users are not logged on
- Drop the timeout for inactive sessions down from the default 30 minutes
- Identify usage patterns and try some demand management if there are very high peak times
- Tweak the number of concurrent processes depending on the usage of the server. For example if things slow down when lots of users are logged in, up the VizQL processes. There is a very good article on Tableau’s website that describes different configuration options here.
- When publishing don’t use the ‘Show sheets as tabs’ option
- You are using a 64bit OS, aren’t you?
Got any more tips to share? Go ahead and post in the comments! Want more info on this topic or anything Tableau related? Contact us at [email protected]