How to improve the performance of the query?

Say if one query takes 20 mins to execute using SQL developer similar when executed thru some script or third party tool takes 35 mins, what is happening exactly why so much difference and how can we improve its performance?

  • Answer:

    SQL Developer will, by default, only fetch the first 100 rows of a query, then pause. To get the entire result set, you have to either navigate to the last line in the Query Result pane, or export the results to a file. So, similar to what says, make sure the 20 minutes is how long it takes for all of the data to be returned.

Raad Al-Rawi at Quora Visit the source

Was this solution helpful to you?

Other answers

Have you measure the actual time it takes to execute the query itself? My guess is that the difference it mainly due to the time it takes to read the result. Assuming that it's a lot of data, the overhead of reading all of it, applying charset conversion, instantiating objects to represent individual values, etc, is going to be significant.

Daniel Kinzler

It may be the drivers the two tools are using to connect to the database server. Network latency can also be responsible. And a very remote possibility can be (it happened with us) that your script is really big and the parser of your tool is not that great so it is taking a lot of time in sending the scripts to the server. Of course, it can be a combination of a lot of these issues.

Kautuk Pandey

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.