![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 2 of 2 total |
![]() |
Sun, May 25 2008 2:29 PM | Permanent Link |
Roy Lambert NLH Associates ![]() | 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. ![]() | 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 Thursday, July 10, 2025 at 01:54 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |