1 Reply Latest reply on Nov 18, 2016 3:46 PM by Patrick A Van Der Hyde

    which is faster? passing parameter to custom sql or using a calculated field?

    siyang.teo

      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!