Re: Problems when using TOP statement
From: Aaron [SQL Server MVP] (ten.xoc_at_dnartreb.noraa)
Date: 01/13/05
- Next message: Aaron [SQL Server MVP]: "Re: table variable vs temp table"
- Previous message: Ed: "table variable vs temp table"
- In reply to: Henke: "Re: Problems when using TOP statement"
- Next in thread: Henke: "Re: Problems when using TOP statement"
- Reply: Henke: "Re: Problems when using TOP statement"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 13 Jan 2005 10:51:20 -0500
> 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: Aaron [SQL Server MVP]: "Re: table variable vs temp table"
- Previous message: Ed: "table variable vs temp table"
- In reply to: Henke: "Re: Problems when using TOP statement"
- Next in thread: Henke: "Re: Problems when using TOP statement"
- Reply: Henke: "Re: Problems when using TOP statement"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|