1 Reply Latest reply on Dec 12, 2018 4:34 PM by Patrick Van Der Hyde

    Date Manipulation - Custom SQL vs Calculated Field (performance)

    John Taylor

      Just thought I'd share a small bit for you all regarding performance with date manipulation for your datasource.


      I had a scenario with a small dashboard that has 3 datasources, each are small queries to MySQL tables and are set as LIVE (extract not a viable option for this dashboard)


      Within each datasource, I was pulling a date+timestamp field, but for my dashboard, I needed to change the timezone for this timestamp. I initially did this with a DATEADD function in Tableau for each of the 3 timestamps.


      When testing this dashboard on the server, it took 40 seconds to load the dashboard. I knew something was really wrong as the 3 queries took <0.5 seconds to run cumulatively.


      By moving the DATEADD functionality to my custom SQL for each of the datasources, it reduced the load time of the dashboard from 40 seconds to 0.5 seconds. Opportunity for optimization perhaps.


      Hope this helps someone


      Tableau Desktop/Server 10.5.3