Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 2 of 2 total |
How do I tell if this is optimised |
Sun, May 25 2008 2:29 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | I finally sused this out
select _BoxNo , (Select Count(_BoxNo) from emails where _Boxno = mailboxes._Boxno) AS _OnFile , (Select Count(_BoxNo) from emails where _ReadBy DOES NOT CONTAIN 'RL' AND _Boxno = mailboxes._Boxno) AS _Unread from mailboxes But the execution plan gives no indication wether its optimised or not. I'm pretty sure it is (ie there are indices on mailboxes._Boxno, emails._BoxNo & emails._ReadBy) but as I develop more complex ones how can I make sure? Roy Lambert |
Sun, May 25 2008 7:22 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< But the execution plan gives no indication wether its optimised or not. I'm pretty sure it is (ie there are indices on mailboxes._Boxno, emails._BoxNo & emails._ReadBy) but as I develop more complex ones how can I make sure? >> For now you have to test it with constant values outside of the scope of a sub-query. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |