I am trying to get data from Oracle into a spark dataframe on databricks. However I noticed the query is taking a long time to rum when I trigger the query from databricks (2.5 hours). The same query is taking less than 30 mins when I run it on SQL Developer. Can someone please help me understand why it is taking longer to run the query through databricks than SQL Developer.?
oracle_df = spark.read \
.format("jdbc") \
.option("url", jdbc_url) \
.option("dbtable", 'query') \
.option("user", "user") \
.option("password", "password") \
.option("driver", "oracle.jdbc.driver.OracleDriver") \
.option("fetchsize", 10000) \
.option("numPartitions", 5) \
.load()