1 of 1 people found this helpful
By saying sql developer, I assume you mean the database is Oracle. Most desktop tools that I've used do array fetches, and don't fetch the whole resultset initially. If your Oracle query is using FIRST_ROWS optimizer target, then Oracle will start returning rows as soon as hits are found, even though it is still running on the DB. By contrast, Tableau extract cant complete until all rows are returned. Try running select count(*) from (<your-query-goes-here>) in SQL Developer to see how long it takes. If it takes a long time to run, your 15sec test case is meaningless.
Thanks Andrew for your response. You are right, it does take 14 min to run in Oracle sql developer. Would you have any suggestions to optimize this query? Thanks!