Reply to Re: How top actually works

Your name:

Reply:


Posted by Gints Plivna on 01/23/08 12:07

On 18 Janv., 00:28, Erland Sommarskog <esq...@sommarskog.se> wrote:
> Gints Plivna (gints.pli...@gmail.com) writes:
> > OK I've also tried it with much bigger table and got the same results
> > as you. Let's hope optimizer will be smart enough to distinguish big
> > work from small work and in case of big work won't do order before
> > top :)
>
> Since you are on SQL 2005, any reason to not use row_number()? Then
> you would have code that would run both on SQL Server and on Oracle?

I'm quite sure row_number won't help me in this case, because I'd like
to limit found number of rows. row_number actually must have order by
clause and ordering before limiting returned number of rows is the
thing I'd like to avoid.
And also this code will run only on SQL Server, so no need for
"portable SQL" (I'm BTW quite sceptical about such "portable SQLs"
generally, because usually it means code will be slow on all
databases :).

Gints

[Back to original 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

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