DataFrame.read().db() is very slow against Oracle databases because the default fetch size for Oracle is 10 records. For example reading 30000 records takes over a minute instead of less than a second.
Set the statement fetch size to be at least 1000 before running the SQL query. Allow the statement fetch size to be set as a DbSourceOption
Thanks mate, this has been addressed by the merge linked below. While I was at it, added support for auto commit and read only settings on the connection...
DataFrame.read().db() is very slow against Oracle databases because the default fetch size for Oracle is 10 records. For example reading 30000 records takes over a minute instead of less than a second.
Set the statement fetch size to be at least 1000 before running the SQL query. Allow the statement fetch size to be set as a DbSourceOption