# Difference of exeuction between SQLPLUS and TOAD

**URL:** <https://forums.toadworld.com/t/difference-of-exeuction-between-sqlplus-and-toad/56005>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [September 7, 2022, 2:35pm UTC](https://forums.toadworld.com/t/difference-of-exeuction-between-sqlplus-and-toad/56005 "2022-09-07T14:35:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kaelem](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@Kaelem](https://forums.toadworld.com/u/Kaelem)\
**Post date:** [September 7, 2022, 2:35pm UTC](https://forums.toadworld.com/t/difference-of-exeuction-between-sqlplus-and-toad/56005/1 "2022-09-07T14:35:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kaelem](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@Kaelem](https://forums.toadworld.com/u/Kaelem)\
**Post date:** [September 7, 2022, 2:38pm UTC](https://forums.toadworld.com/t/difference-of-exeuction-between-sqlplus-and-toad/56005/2 "2022-09-07T14:38:54Z")

</div>

My release of toad: 16.1.53.1594

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [September 7, 2022, 2:39pm UTC](https://forums.toadworld.com/t/difference-of-exeuction-between-sqlplus-and-toad/56005/3 "2022-09-07T14:39:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kaelem](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@Kaelem](https://forums.toadworld.com/u/Kaelem)\
**Post date:** [September 7, 2022, 2:41pm UTC](https://forums.toadworld.com/t/difference-of-exeuction-between-sqlplus-and-toad/56005/4 "2022-09-07T14:41:10Z")

</div>

Hi

the time is computed after the last row. But, my query returns only one row.

---

<div class="post-metadata">

**Author:** ![Kaelem](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@Kaelem](https://forums.toadworld.com/u/Kaelem)\
**Post date:** [September 7, 2022, 2:42pm UTC](https://forums.toadworld.com/t/difference-of-exeuction-between-sqlplus-and-toad/56005/5 "2022-09-07T14:42:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kaelem](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@Kaelem](https://forums.toadworld.com/u/Kaelem)\
**Post date:** [September 7, 2022, 2:44pm UTC](https://forums.toadworld.com/t/difference-of-exeuction-between-sqlplus-and-toad/56005/6 "2022-09-07T14:44:08Z")

</div>

> [@JohnDorlon](#):
>
> SQL\*Plus spooling is slow

==\> Ok

But explain plan is slightly different.

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [September 7, 2022, 2:44pm UTC](https://forums.toadworld.com/t/difference-of-exeuction-between-sqlplus-and-toad/56005/7 "2022-09-07T14:44:41Z")

</div>

Are you using the same Oracle client in Toad as in SQLPlus?

---

<div class="post-metadata">

**Author:** ![Kaelem](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@Kaelem](https://forums.toadworld.com/u/Kaelem)\
**Post date:** [September 7, 2022, 3:51pm UTC](https://forums.toadworld.com/t/difference-of-exeuction-between-sqlplus-and-toad/56005/8 "2022-09-07T15:51:13Z")

</div>

Hi,

the used client is the same on both side.

Regards

---

<div class="post-metadata">

**Author:** ![Kaelem](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@Kaelem](https://forums.toadworld.com/u/Kaelem)\
**Post date:** [September 7, 2022, 3:52pm UTC](https://forums.toadworld.com/t/difference-of-exeuction-between-sqlplus-and-toad/56005/9 "2022-09-07T15:52:29Z")

</div>

Hi

even with sqlplus -FAST the result is the same.

Regards
