Hi, I was a little confused after some discussion with a friend on how to improve Tableau query performance.
He said that all the calculated fields I did are computed within Tableau hence I am experiencing massive lag.
However, my understanding is that aside from table calculations, most calculated fields are sent to the underlying database as an sql query for computation before returning to Tableau for rendering.
He gave an example like for the range of dates (start - end dates) should be placed in the custom SQL in the where clause e.g.
'WHERE DATE_TIME BETWEEN <Parameters.Start Date> AND <Parameters.End Date>'
instead of my current way of setting it within a calculated field. i.e.,
'[DATE_TIME] >= [Start Date] AND [DATE_TIME] <= [End Date]'
I tried both and recorded the performance and they gave very close querying time of 11sec.
Doesn't seem like there are any noticeable improvements. But I will just like to confirm that this is true.
Appreciate if anyone can give any additional advice too. Thank you!
Siyang,
You can use the performance monitor in Tableau and see that these queries are happening as you stated. They should be roughly equal in this example. The bonus of doing things in Tableau - if your database supports parallel queries, you may get extra benefits by just using everything with filters. I stay clear of custom sql unless some very specific need arises.
Patrick
Become a Viz Whiz on the Forums! Support the Community and master Tableau.