Tableau Parallel Query Session for Oracle and Exadata.

Friday, August 4, 2017

Tags: tableau, parallel, query, session, oracle, exadata

By default Exadata receives queries in serial rather than parallel. And you might want to execute your queries in parallel. To achieve this you have basically 3 options:

  1. Using Hints on your query
    SELECT /*+PARALLEL(a 16)*/ a.ID, a.name, a.age FROM customers AS a
  2. You can alter your tables to receive parallel sessions by default
    ALTER TABLE customers PARALLEL 16
  3. Or you can alter the session to execute all queries in parallel under that session
    ALTER SESSION FORCE PARALLEL QUERY PARALLEL 16

However you can need to make sure that your DBA grants your user parallel sessions.

Under this circumstances, your options with Tableau are

  1. You can enter custom SQL statements for each of your datasources and use your query hints
    Tableau New Custom SQL
    Tableau Custom SQL
    And you can enter your query here, for example:
    SELECT /*+PARALLEL(a 16)*/ a.customer, COUNT(a.ID) AS trx_count, SUM(a.amount) AS trx_amount FROM transactions AS a GROUP BY a.customer
  2. You can alter session with Initial SQL option
    Tableau Initial SQL
    Tableau Initial SQL
    And you can enter your initial query here as:
    ALTER SESSION FORCE PARALLEL QUERY PARALLEL 16

    You can adjust the parallel session as desired (2/4/8/16/32/64... :))

If you publish that datasource to Tableau Server, you will be able to maintain your parallel query execution for your published workbooks too.

For the second option, there is a checkbox for "Ignore initial SQL statements for all data sources" on the server settings where you need to leave unchecked: Tableau Server Configuration




© 2024 - DJames.net