Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Performance of Select setup
Message
From
23/05/2001 12:12:52
 
 
To
23/05/2001 10:49:40
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00510367
Message ID:
00510431
Views:
14
>I was e-mailed this from a QA person on a project I'm working on. They use SQL7. I have never setup my Selects like this, plus I don't use standard selects I use ANSI Joins. Is there any validity to the below statement.
>
>
>"I just would like to make a friendly reminder for all developers in order to
>increase performance.
>
>In the Where clause of the Select Statement we should start with Boolean
>expressions instead of joins to reduce searching time.
>
>WHERE
> i.ob_type = '1' AND
> b.ghost_card_flag = 0 AND
> h.card_id = g.card_id AND
> b.card_id = c.card_id
>
>Regards"


The reasoning behind it is that it is faster to compare a field's to a constant (i.ob_type = '1') than to another field's value in a different table. In this case, if the boolean(s) are on the top and return false, the rest of the (more costly) comparisons in the where clause are not executed, thereby increasing performance.
Andres M. Chiriboga, MCSE, MCP+I
Previous
Reply
Map
View

Click here to load this message in the networking platform