You are here: Re: Where conditions, Encryption « MsSQL Server « IT news, forums, messages
Re: Where conditions, Encryption

Posted by Dan Guzman on 05/05/07 13:59

> 1. Are stored procedures WITH ENCRYPTION slower than the ones without
> encryption?

The execution speed will be identical with or without encryption since the
compiled plan is used. I also ran a cursory test and found no measurable
difference compilation speed.

> 2. Should i put most restrictive conditions first or last in WHERE? In
> which order does MSSQL execute conditions? Or MSSQL determents what
> would be best and does not bother with the way i sorted conditions?

The order you specify WHERE clause predicates makes no difference. The SQL
Server optimizer will rearrange predicates as it deems necessary to maximize
performance. The biggest query performance gains are realized with indexing
and sargable expressions that SQL Server can use to generate the most
efficient plan.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Igor" <jerosimic@gmail.com> wrote in message
news:1178362395.592943.90460@q75g2000hsh.googlegroups.com...
> 1. Are stored procedures WITH ENCRYPTION slower than the ones without
> encryption?
>
> 2. Should i put most restrictive conditions first or last in WHERE? In
> which order does MSSQL execute conditions? Or MSSQL determents what
> would be best and does not bother with the way i sorted conditions?
>
> for example:
> SELECT *
> FROM [users]
> WHERE
> [user_id] = 1 AND
> [baned] = 0
>
> Is "[user_id] = 1" or "[baned] = 0" going to be executed first?
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация