|
Posted by drawnai on 04/24/06 15:13
Erland Sommarskog wrote:
> (drawnai@hotmail.com) writes:
> > Defined behaviour is as defined behaviour does. Outperforming an
> > equivalent query ten to one is worth a rewrite 5 years from now, in the
> > unlikely event that microsoft, remove the ability.
>
> But the ability isn't there. It only looks like it is. That's why it's
> undefined.
>
> In SQL Server 6.5 GROUP BY implied an ORDER BY. Not so any more. In SQL 2000
> people would put TOP 100 PERCENT ORDER BY in a view, and they found that
> they did seem to need an ORDER BY when selecting from the view. In SQL 2005
> more than one have found that they don't get away with it.
>
> You get the result you get by happenstance. There is nothing that Microsoft
> can remove, because they never added it. One day the optimizer decides to
> do a different plan, and you don't get the result you wanted.
>
> Of course, you may be prepared to take the gamble, but the day it breaks,
> it's going to break hard.
Everything you say is true. I don't disagree with any of it. However,
from experience,
an ordered update against a single table is worth the risk, that I
might have to (one day) rewrite it. I'm not writing space targeted
software (anymore.)
I find this particularly the case, because I've never seen an explicit
index hint against
a single table, to be ignored. Similarly, microsoft actually advertise
the update set
@fred = col = @fred + 1.
I feel justified in my assertion that "by the time they don't support
it, they'll have introduced something faster," because on the whole,
(and very definitely in this case)
they have done.
Most tech authorities hold that 2 second is an acceptable response time
for a webpage. I maintain that anything over 40 mS is failure.
As for "It may not work at sometime in the future." Well that's the
most ridiculous strawman I've heard in a long time.
I judge that keeping an eye on code is an ongoing requirement, and I
constantly watch for changes that invalidate something I depend on.
>From .net 1.1, to .net 2.0 invoking the Sleep method, meant a change
from a class member, to a static member, meaning only a thread can
sleep itself. I don't see my watching for changes to unlisted features
to be any different to changes to listed features.
>
>
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|