# Wrong SQL executed in split pane editor

**URL:** <https://forums.toadworld.com/t/wrong-sql-executed-in-split-pane-editor/32484>\
**Category:** Toad for Oracle - Beta\
**Created:** [January 30, 2015, 11:58am UTC](https://forums.toadworld.com/t/wrong-sql-executed-in-split-pane-editor/32484 "2015-01-30T11:58:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phyllis.helton\_1150](https://avatars.discourse-cdn.com/v4/letter/p/ac8455/32.png) [@phyllis.helton\_1150](https://forums.toadworld.com/u/phyllis.helton_1150)\
**Post date:** [January 30, 2015, 11:58am UTC](https://forums.toadworld.com/t/wrong-sql-executed-in-split-pane-editor/32484/1 "2015-01-30T11:58:58Z")

</div>

I have two SQL statements in my editor - one runs really quickly and the other is one I’m trying to tune. I split my editor to work with these, and have the focus on the right side where the fast SQL is (it selects 1 field from 1 table with a simple where clause based on one field). The left hand side had the cursor on the slow SQL. I hit F9 to run the SQL and it was taking a really long time so I pressed Ctrl-E to see what was going on and realized that the plan was run for the statement on the left-hand side. I then selected my fast SQL and pressed F9 and got results right away. Unselect, F9, SQL from the other side of the editor is run.

–  
**Phyllis Helton**

Data Magician  
Digital Strategies, Cru | Data Sciences & Analytics  
Office ☎ 407-515-4452

[phyllis.helton@cru.org](mailto:phyllis.helton@cru.org)  
 ![](http://emailassets.cru.org/cdn-crumail/cru.png)

---

<div class="post-metadata">

**Author:** ![mstaszew](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/mstaszew/32/23_2.png) [@mstaszew](https://forums.toadworld.com/u/mstaszew)\
**Post date:** [February 2, 2015, 6:51am UTC](https://forums.toadworld.com/t/wrong-sql-executed-in-split-pane-editor/32484/2 "2015-02-02T06:51:19Z")

</div>

I cannot reproduce this. I tried with a simple example (select 1 from dual; and select 2 from dual;) and whichever memo and statement had focus is the one that was executed. There are a few places where focus is explicitly given to the memo, always acting on  
the last activated memo and not on any specific one (left/top or right/bottom) and nothing looks off there.

Michael

On 01/30/2015 02:59 PM, phyllis.helton\_1150 wrote:

> **[Wrong SQL executed in split pane editor](http://www.toadworld.com/products/toad-for-oracle/toad_for_oracle_beta_program/f/86/t/23723.aspx)**

> Thread created by phyllis.helton\_1150  
> I have two SQL statements in my editor - one runs really quickly and the other is one I'm trying to tune. I split my editor to work with these, and have the focus on the right side where the fast SQL is (it selects 1 field from 1 table with  
> a simple where clause based on one field). The left hand side had the cursor on the slow SQL. I hit F9 to run the SQL and it was taking a really long time so I pressed Ctrl-E to see what was going on and realized that the plan was run for the statement on  
> the left-hand side. I then selected my fast SQL and pressed F9 and got results right away. Unselect, F9, SQL from the other side of the editor is run.

> --  
> **Phyllis Helton**
> 
> Data Magician
> 
> Digital Strategies, Cru |  
> Data Sciences & Analytics
> 
> Office ☎ 407-515-4452  
> [phyllis.helton@cru.org](mailto:phyllis.helton@cru.org)
> 
> ![](https://global.discourse-cdn.com/quest/original/3X/9/4/94bf0c4f5e9dec7932932b0cb0b94169a403b1fd.png)

> To reply, please reply-all to this email.
> 
> [Stop receiving emails](http://www.toadworld.com/products/toad-for-oracle/toad_for_oracle_beta_program/f/86/t/23723.aspx?subscribe=false) on this subject.
> 
> Or [  
> Unsubscribe from Toad for Oracle - Beta](http://www.toadworld.com/products/toad-for-oracle/toad_for_oracle_beta_program/f/86.aspx?subscribe=false) notifications altogether.
> 
> Toad for Oracle - Beta Discussion Forum

> [Flag](http://www.toadworld.com/products/toad-for-oracle/toad_for_oracle_beta_program/f/86/t/23723.aspx?AbuseContentId=b9ebb292-c53d-4a20-bc0d-799392b25fdb&AbuseContentTypeId=46448885-d0e6-4133-bbfb-f0cd7b0fd6f7&AbuseFlag=true)  
> this post as spam/abuse.

> ![](https://global.discourse-cdn.com/quest/original/3X/5/0/50b30fd5f87c85fe5cba2635cb83316ca71250d7.gif)

---

<div class="post-metadata">

**Author:** ![phyllis.helton\_1150](https://avatars.discourse-cdn.com/v4/letter/p/ac8455/32.png) [@phyllis.helton\_1150](https://forums.toadworld.com/u/phyllis.helton_1150)\
**Post date:** [February 2, 2015, 10:26am UTC](https://forums.toadworld.com/t/wrong-sql-executed-in-split-pane-editor/32484/3 "2015-02-02T10:26:35Z")

</div>

Today I'm not getting that behavior either. I'll keep an eye on it and see if I can figure out what might be setting it off.

On Mon, Feb 2, 2015 at 9:51 AM, Michael Staszewski [bounce-mstaszew@toadworld.com](mailto:bounce-mstaszew@toadworld.com) wrote:

> **[Re: Wrong SQL executed in split pane editor](http://www.toadworld.com/products/toad-for-oracle/toad_for_oracle_beta_program/f/86/p/23723/51670.aspx#51670)**

> Reply by Michael Staszewski  
> I cannot reproduce this. I tried with a simple example (select 1 from dual; and select 2 from dual;) and whichever memo and statement had focus is the one that was executed. There are a few places where focus is explicitly given to the memo, always acting on  
> the last activated memo and not on any specific one (left/top or right/bottom) and nothing looks off there.
> 
> Michael
> 
> On 01/30/2015 02:59 PM, phyllis.helton\_1150 wrote:

> > **[Wrong SQL executed in split pane editor](http://www.toadworld.com/products/toad-for-oracle/toad_for_oracle_beta_program/f/86/t/23723.aspx)**

> > Thread created by phyllis.helton\_1150  
> > I have two SQL statements in my editor - one runs really quickly and the other is one I'm trying to tune. I split my editor to work with these, and have the focus on the right side where the fast SQL is (it selects 1 field from 1 table with  
> > a simple where clause based on one field). The left hand side had the cursor on the slow SQL. I hit F9 to run the SQL and it was taking a really long time so I pressed Ctrl-E to see what was going on and realized that the plan was run for the statement on  
> > the left-hand side. I then selected my fast SQL and pressed F9 and got results right away. Unselect, F9, SQL from the other side of the editor is run.

> > --  
> > **Phyllis Helton**
> > 
> > Data Magician
> > 
> > Digital Strategies, Cru |  
> > Data Sciences & Analytics
> > 
> > Office ☎ 407-515-4452  
> > [phyllis.helton@cru.org](mailto:phyllis.helton@cru.org)
> > 
> > ![](https://global.discourse-cdn.com/quest/original/3X/9/4/94bf0c4f5e9dec7932932b0cb0b94169a403b1fd.png)

> > To reply, please reply-all to this email.
> > 
> > [Stop receiving emails](http://www.toadworld.com/products/toad-for-oracle/toad_for_oracle_beta_program/f/86/t/23723.aspx?subscribe=false) on this subject.
> > 
> > Or [  
> > Unsubscribe from Toad for Oracle - Beta](http://www.toadworld.com/products/toad-for-oracle/toad_for_oracle_beta_program/f/86.aspx?subscribe=false) notifications altogether.
> > 
> > Toad for Oracle - Beta Discussion Forum

> > [Flag](http://www.toadworld.com/products/toad-for-oracle/toad_for_oracle_beta_program/f/86/t/23723.aspx?AbuseContentId=b9ebb292-c53d-4a20-bc0d-799392b25fdb&AbuseContentTypeId=46448885-d0e6-4133-bbfb-f0cd7b0fd6f7&AbuseFlag=true)  
> > this post as spam/abuse.

> > ![](https://global.discourse-cdn.com/quest/original/3X/5/0/50b30fd5f87c85fe5cba2635cb83316ca71250d7.gif)

> To reply, please reply-all to this email.
> 
> [Stop receiving emails](http://www.toadworld.com/products/toad-for-oracle/toad_for_oracle_beta_program/f/86/t/23723.aspx?subscribe=false) on this subject.
> 
> Or [Unsubscribe from Toad for Oracle - Beta](http://www.toadworld.com/products/toad-for-oracle/toad_for_oracle_beta_program/f/86.aspx?subscribe=false) notifications altogether.
> 
> Toad for Oracle - Beta Discussion Forum

> [Flag](http://www.toadworld.com/products/toad-for-oracle/toad_for_oracle_beta_program/f/86/p/23723/51670.aspx?AbuseContentId=40c90b01-e955-4a28-8cde-e0ed91fc2767&AbuseContentTypeId=f586769b-0822-468a-b7f3-a94d480ed9b0&AbuseFlag=true) this post as spam/abuse.

> ![](https://global.discourse-cdn.com/quest/original/3X/5/0/50b30fd5f87c85fe5cba2635cb83316ca71250d7.gif)

--  
**Phyllis Helton**

Data Magician  
Digital Strategies, Cru | Data Sciences & Analytics  
Office ☎ 407-515-4452

[phyllis.helton@cru.org](mailto:phyllis.helton@cru.org)  
 ![](https://global.discourse-cdn.com/quest/original/3X/9/4/94bf0c4f5e9dec7932932b0cb0b94169a403b1fd.png)
