You are here: Re: datetime « MsSQL Server « IT news, forums, messages
Re: datetime

Posted by manstein on 10/02/72 11:36

page 488 - 489 The Guru's Guide to SQL Server Architecture and
Internals. Ken Henderson gives this code as an example of folding:

SELECT *
FROM Orders
WHERE ISNULL(Orderdate,getdate())>'2003-04-06 19:55:00.000'

Now, if you check the execution plan, you will see that there is an
index scan on the Orderdate column. Apparently Henderson considers
this an efficient use of an index; hence a good example of optimization
through folding. Similarly, my code also uses a index scan which is
far better than a table scan. Though you do make the distinction above
between index scan and index seek, based on the examination of the
execution plans, your suggestion that my code is in-efficient is
unwarrented. Thanks!

 

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

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