Loading

How to Adjust Oracle JDBC Fetch Size

Julkaisupäivä: Jan 27, 2025
Kuvaus

How to adjust Oracle JDBC Fetch Size to get better query speed.

Ratkaisu

1. Create an oracle.tdc file as below

 

<?xml version='1.0' encoding='utf-8' ?>
<connection-customization class='oracle' enabled='true' version='8.10'>
<vendor name='oracle'/>
<driver name='oracle'/>
<customizations>
<customization name='CAP_JDBC_USE_ADAPTIVE_FETCH_SIZE' value='no' />
</customizations>
</connection-customization>


2.Create oracle.properties as below.

 

defaultRowPrefetch=10000

NOTE: the user should adjust the value "10000" to suit their own environment.


3. See Installing tdc and properties files for instructions on where to save the oracle.properties and oracle.tdc files. Example (Windows): C:\Users\xxxx\Documents\My Tableau Repository\Datasources.

4. Put the Oracle JDBC driver (e.g. ojdbc8.jar) into:
Windows: C:\Program Files\Tableau\Drivers
Mac: ~/Library/Tableau/Drivers 
Linux: /opt/tableau/tableau_driver/jdbc 

5. Start Tableau Desktop and use Oracle connector to connect. Tableau will use JDBC to connect to Oracle and the customized Fetch Size.

6. For quicker tuning suitable Fetch Size, after connecting to Oracle in Tableau Desktop, click Data - Extract data and choose top 2000,000 rows. Then enable performance recording to check how much time elapsed for the query. (Help - Settings and performance)

  

Lisäresurssit

Since 2020.4 Tableau has introduced adaptive fetch size method.

 

Knowledge-artikkelin numero

001496900

Liitteet

oracle.tdc

0 KB

oracle.properties

0 KB

 
Ladataan
Salesforce Help | Article