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:
- Using Hints on your query
SELECT /*+PARALLEL(a 16)*/ a.ID, a.name, a.age FROM customers AS a
- You can alter your tables to receive parallel sessions by default
ALTER TABLE customers PARALLEL 16
- 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
- You can enter custom SQL statements for each of your datasources and use your query hints
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
- You can alter session with Initial SQL option
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: