Skip to Main Content
  • Questions
  • Query Performance on client significantly slower than on server

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Que.

Asked: October 27, 2020 - 9:16 am UTC

Last updated: October 29, 2020 - 2:45 am UTC

Version: Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 on Windows Server 2019

Viewed 10K+ times! This question is

You Asked

Hi all,
we have an application which runs reports from Windows7/10 client against an ORCALE 19c Standard Edition Database on Windows Server 2019.
Before, the application queries where running against ORACLE 12c Standard Edition.
We have noticed that the reports run significantly longer against ORACLE 19C.
So we have then tried to find the cause. Therefore we have taken the pure select SQL of the report and have run it from SQL Developer 20.0.0 from an Windows 10 Client and then directly on the Windows server. And still the same.
The select uery run from SQL Developer on the Server runs approximately 3.5 secs, and from the client it needs about 180 secs.
Then we have run autotrace from within SQL Developer on both platforms and it gives us exactly the same execution plan.
The connection in SQL Developer on both platforms is defined with sys as sysdba and a TNS connection via a network alias.
We have currently abosulutely no clue why this is happening. Basically everything is the same, the only difference is that SQL Developer runs once on Windows 10 and once on Windows Server 2019.
We are lookoing forwrd to any hints and tipps you might have.
Thanks a lot for your expertise.
Cheers Que

and Connor said...

1) One quick thing to check is fetch size. In Tools => Preferences => , Database => Advanced, try bumping up your array fetch size to 200.

If there are network issues at play, this can make a significant difference.

2) If you try the SQL from (say) SQL Plus on both server and client, do you see a similar disparity?

If that doesn't help, come back with a review and we'll explore more.

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

ORACLE 19c query Performance disparity client and server

Que Bonito, October 28, 2020 - 8:55 am UTC

Many thanks for your fast reply.
After setting the fetch size to 200 the query on the win 10 client takes now 111 secs compared to 166 secs with the fetch size default of 50. The performance on the server is the same, very fast with 2 to 3 secs.
As the .net application peforming the query is not acccessing via sql developer i was wondering what this setting would help ? Or do you just want to see with that approach whether there might be network issues? Ok then this is my review and I look forward to your next recommended steps. Cheers from Switzerland
Connor McDonald
October 29, 2020 - 2:45 am UTC

OK, next step would be enable a trace for both operations (server and client)

- exec dbms_monitor.session_trace_enable(waits=>true)
- run query
- exit/disconnect

You will get a trace file for each. Run them through tkprof and we'll get a better idea of where the time is lost.

More to Explore

Performance

Get all the information about database performance in the Database Performance guide.