Performance Tuning for Tableau Dashboard
Photo by Clay Banks on Unsplash
Tableau is the leading visualization tool now in market ,when we consider a small dataset performance won’t be much issue .But when we consider a large data set, performance of the dashboard is very important .If it take more seconds to load the dashboards ,it won’t be looking good for the presentation.
So we need to consider how can we improve the performance of our Tableau Dashboard.We can do performance improvement in three-level
But our first step should be Performance Recorder ,it is not available in Tableau Public.
What is a Tableau Performance Recorder?
The performance recorder can pinpoint slow worksheets, slow queries, and long render times on a Dashboard.It will start recording the performance the moment we click the start.
Performance recorder helps us to us know which connection and view is slower .View performance metrics workbook that Tableau creates to analyze and troubleshoot different events that are known to affect performance:
Connections to data sources
To start Performance Recorder
Help>>Setting and Performance >>Start Performance Recording
To stop recording and view a temporary workbook containing results from the recording session, follow this step:
Help > Settings and Performance > Stop Performance Recording
You can now View the performance workbook and begin your analysis.
Now after seeing the performance issues ..let’s look into ways how we can improve our performance
Data story we create must be truthful,engaging, and purposeful .Before bringing all the data to Tableau,we must analyze it.Then we need to optimize the Dataset.Following tips can be done on the Data Level to improve the Performance.
a.Remove Unnecessary Items
Everything present in the Tableau environment takes time to make. More time spent making means slower performance. Each worksheet will be at least an additional query to compute. Remove all unnecessary charts, sheets, and marks that are not being used.
Minimize the number of fields based on the analysis being performed. Use the hide all unused fields option to remove unused columns from a data source.
Minimize the number of records. Use extract filters to keep only the data you need.
b. Check the Describe of the field
It is good to see the Details of the fields ,to determine if this field is needed for our visualization or not.
Extracts are stored in a very optimized way,it is easy for Tableau to access a query, but Tableau can store all the result of all your calculations in values of the data source. Tableau won’t do the calculation over and over when analysis , but Tableau will calculate once and store it in the data source. But major drawback will be that data won’t be live and always need to refresh.
Extracts are not always the long-term solution. The typical extent of an extract is between 500 million to one billion rows; mileage will vary. When querying against constantly-refreshing data, a live connection often makes more sense when operationalizing the view
Extract option is available for Desktop and Server tableau
d.Choose the Relationship for the connection :Relationship is considered as best connection Tableau won't merge the table, the tables will be kept as it is. keep the dataset small by this. It will generate queries only relevant to the data source, the second best option goes to Join, and then comes the Blend.
e.Cardinality,Integrity help to improve the performance
In cardinality there is two types Many,one.Cardinality means how many or how few unique values there are for the shared field.
If we choose 0ne,the data must be the unique then it is better to go for one.
Data will be joined before aggregation, during analysis it will optimize the queries, making sure the key we are using must be unique eg :customer id must be unique no duplicate must be there.
In Referential Integrity, a value in one table is guaranteed to have a match in the other table.In Referential Integrity there is two options all record match,some record match
All record match give better performance.If Data is clean ,everything gonna match .Tableau don’t need to look up for unmatched data.If we go look for some match,Tableau will spent resources to look for unmatched data
We can filter the data we need to bring from data source .
Eg:If don’t need past 10 years .
click on add near Extract in Data source page ,then click on the table >>edit>>add >> orderddate>> year >>select only the required year we need.
Joins, Unions and Relationships are steps that need to be taken when working with multiple data sources. They are configured before views are created. Therefore, it is a very important step to do right in setting the standard of the data that you will be working with. When you are working with multiple data sources with vast numbers of records, the performance of your Dashboards can suffer. However, there are multiple ways you can improve performance with how your joins, unions, and relationships are configured. When tables is matched with matched fields data set gets smaller .There is 4 types of Joins
4.Full outer Join
Inner join is preferred for performance improvement compared to other Joins
Filtering in Tableau is extremely powerful .The inefficient and excessive filters are one of the most common causes of poorly performing workbooks and dashboards.
It is used between the data and tableau
b.Data source filter
It is used between the data source of tableau, and dashboard. Because if we can filter the data , that enter in to the dashboard
Every single time you use a context filter, you refresh the cache information. This ultimately can also decrease performance as well. If it is necessary, using one context filter already helps a lot rather than using many
It is the worst one
when there 2 quick filter ,Tableau will create 2 filter query to the extract from the Data Source.So Imagine if there is 7 quick filter,7 query will be send to the data source . It will affect the performance of Dashboard.
So to avoid such condition use Action filter are used.In the above picture the Region chart is used as action filter and so we can delete the quick filter region.
e.Choose the go for All Values in Database instead of only Relevant Values.:
If we go for relevant values ,more query will be sent to the database
f.Using Apply Button in the Filter
Enable "Apply" button with filters with multiple selections in the filter configuration dropdown > Customise > Show Apply Button. This prevents repetitive queries each time a selection is made and computes the query at once.
g.Wild card Match,Custom List
If we take product name there will so many ,so use wild card ,custom list for better result
h.Filter with Number or Boolean work faster than strings:
Computer Process Boolean and Numbers faster than Strings.
a.Perform calculations in the database:
Wherever possible, especially on production views, perform calculations in the database to reduce overhead in Tableau. Aggregate calculations are great for calculated fields in Tableau. Perform row-level calculations in the database when you can.
b.Reduce the number of nested calculations
unpacking a calculation and then building it takes longer for each extra layer.
c.Use fast calculation method
MIN,MAX should be used instead of AVG,COUNTD, ATTR .They are slow calculation method that requires more processing than MIN or MAX.
d.Use Boolean ,Number for calculation instead of strings
Computers can process integers and Booleans (t/f) much faster than strings. Boolean>Number(Whole)>Number(Decimal)>DateTime>String
Don’t work with data you don’t need
Upgrading to the newest version may boost performance without needing anything else.
Another factor is Environment,the reason for each person will be different,So we need to check each of the above checklist and sort it out.
Due to Slow Network and System the performance can be reduced.