3 Replies Latest reply on Sep 14, 2016 1:22 AM by kettan

    improving performance of time interval query

    siyang.teo

      It took some customization to obtain a time interval parameter filter on my cross filter. The filter enables display in 24hr format too. (thanks to a previous forum contributor)

       

      However, it resulted in an extremely bulky SQL query back to the database, and that alone is responsible for about 30 sec of query time.

       

      The query is as shown:

       

      DATEADD('minute', 
      
      
        INT( 
            DATEDIFF('minute', DATETRUNC('day', [YF : Time]), [YF : Time]) / [Bin Param Convert] 
           ) * [Bin Param Convert], 
      
      
        DATETRUNC('day', [YF : Time])
      )
      

       

      Does anyone know how to make this more efficient, whether through optimising this current field calculation in Tableau, or any other alternatives (perhaps transferring the query as a database view or something)?

       

      Sample twbx attached.

       

      Thanks!