0 Replies Latest reply on Apr 16, 2012 8:46 AM by vaidaslauzeckas

    SQL generation with list of values

      Hello,

      I have huge oracle database with few indexed fields. I create direct connection in Tableau desktop and add filter on indexed fields to worksheet.

      If i add less then 10 different values to custom value list it generates sql where part like this:

      WHERE ("BL_TRAFFIC"."USER_ID" IN ('A', 'B', 'C', ....))

      This type of SQL works really fast as it uses indexes.

       

      The problem:

      If I add more then 10 different values Tableau generates SQL like this:

      <QUERY protocol='05136d88'>

      SELECT *

      FROM (SELECT "BL_TRAFFIC"."USER_ID" AS "USER_ID"

      FROM "TEST"."BL_TRAFFIC" "BL_TRAFFIC"

      GROUP BY "BL_TRAFFIC"."USER_ID"

      ORDER BY 1 ASC NULLS FIRST)

      WHERE ROWNUM <= 56

      </QUERY>

       

      As database ir really huge SQL above extracting data for too long.  Is there any wayt to change a way how Tableau generates SQL or force him to use Where ( IN())?

       

      V.