Kaelem
September 7, 2022, 2:35pm
1
Hi
I have an Oracle 19.13 on windows x64.
I've notice a difference of execution between Toad and SQL PLus with the same user and the same instance.
I have a query that when I execute on TOAD it executes in 9 secondes.
And when I executes on sqlplus , on the database server in CMD, it takes more than 1 minutes.
And I can see that the explain plan is lightly differente.
I suspect TOAD to modify slightly via hints or other as session parameter, the execution of the request, what do you think?
It seems that parameter session are similar.
Regards
Kaelem
September 7, 2022, 2:38pm
2
My release of toad: 16.1.53.1594
Toad does not add any optimizer hints.
When you time it in SQLPlus, are you only counting the time until the first row is returned? SQL*Plus spooling is slow, so that could account for a lot of the time.
Kaelem
September 7, 2022, 2:41pm
4
Hi
the time is computed after the last row. But, my query returns only one row.
Kaelem
September 7, 2022, 2:42pm
5
I did a trace of the sqlplus session. And I can see a lot of "PGA Memory operation" waits. That's why I tough that maybe it could doing sort in local memory computer , something like that.
Kaelem
September 7, 2022, 2:44pm
6
==> Ok
But explain plan is slightly different.
Are you using the same Oracle client in Toad as in SQLPlus?
Kaelem
September 7, 2022, 3:51pm
8
Hi,
the used client is the same on both side.
Regards
Kaelem
September 7, 2022, 3:52pm
9
Hi
even with sqlplus -FAST the result is the same.
Regards