Re: Problems when using TOP statement
From: Henke (henke_nord_at_hotmail.com)
Date: 01/13/05
- Next message: David Portas: "Re: BEGIN END, CURSORS Statements"
- Previous message: Adam Machanic: "Re: Scan and Update"
- In reply to: Aaron [SQL Server MVP]: "Re: Problems when using TOP statement"
- Next in thread: Aaron [SQL Server MVP]: "Re: Problems when using TOP statement"
- Reply: Aaron [SQL Server MVP]: "Re: Problems when using TOP statement"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 13 Jan 2005 17:07:03 +0100
When I added an ORDER BY clause the times became 2 seconds when using TOP 30
and 24 seconds when using TOP 20.
/Henke
"Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> skrev i meddelandet
news:etTpxgY%23EHA.1084@tk2msftngp13.phx.gbl...
>> Maybe it is. But the problem is that when using TOP 30 it works fine
> (three
>> seconds) and with TOP 20 it doesn't (18 seconds).
>
> Could you please try adding an ORDER BY clause (e.g. to an indexed
> column).
> Since the query is useless and meaningless without the ORDER BY clause
> (e.g.
> no reason to keep it that way), I see little point in arguing about what
> happens here or troubleshooting it...
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
- Next message: David Portas: "Re: BEGIN END, CURSORS Statements"
- Previous message: Adam Machanic: "Re: Scan and Update"
- In reply to: Aaron [SQL Server MVP]: "Re: Problems when using TOP statement"
- Next in thread: Aaron [SQL Server MVP]: "Re: Problems when using TOP statement"
- Reply: Aaron [SQL Server MVP]: "Re: Problems when using TOP statement"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|