Re: SQL 2000 manual start job sort order
From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 06/23/04
- Next message: Tibor Karaszi: "Re: Priority Order On Where Clauses"
- Previous message: Ed Fultz: "Priority Order On Where Clauses"
- In reply to: kevin: "Re: SQL 2000 manual start job sort order"
- Next in thread: anonymous_at_discussions.microsoft.com: "Re: SQL 2000 manual start job sort order"
- Reply: anonymous_at_discussions.microsoft.com: "Re: SQL 2000 manual start job sort order"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 23 Jun 2004 15:22:06 +0200
As you might know, without ORDER BY, SQL Server is free to optimize and execute a query in any way
it like. I.e., rows can be returned in any order. If you add ORDER BY, then the optimizer has to
create an execution plan that returns the rows in that order. It is no unusual to find that a
developer forgot to add ORDER BY as the optimizer happened to execute the query in a way that you
indeed received the rows in a correct order. But as you have more data in the table, etc, the
optimizer might find it more efficient to execute the query in some other way, and the result is no
longer ordered in that way (because of the missing ORDER BY). According to Vyas' post, this is what
has happened here. I.e., if this is what we are seeing, there's no need to worry about data
corruption.
-- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/ "kevin" <anonymous@discussions.microsoft.com> wrote in message news:1ffe301c45922$ba077eb0$a601280a@phx.gbl... > Uri, up till last week, everything was fine. But now, if > I open the properties of the job, the steps are still > correctly listed in numerical order. But, if I try to > start the job manually, the dialog box opens and voila! > they're listed alphabetically by job step name. Weird. > I'm just wondering if this implies corruption in any way. > thanks > k > >-----Original Message----- > >Hi ,Vyas > >What is the procedure? > >EXEC sp_help_jobstep @job_name = 'Backup' seems to > returned a right order of > >steps ? > > > >"Narayana Vyas Kondreddi" <answer_me@hotmail.com> wrote > in message > >news:OQPHpBSWEHA.2168@TK2MSFTNGP10.phx.gbl... > >> I am not sure if this is in the KB, but it is a bug > with the stored proc > >> that returns the job steps. The developer forgot to > put an ORDER > >BY...oops! > >> -- > >> HTH, > >> Vyas, MVP (SQL Server) > >> http://vyaskn.tripod.com/ > >> Is .NET important for a database professional? > >> http://vyaskn.tripod.com/poll.htm > >> > >> > >> "kevin" <anonymous@discussions.microsoft.com> wrote in > message > >> news:204e101c4591e$1510a5c0$a101280a@phx.gbl... > >> Hello - I am wondering if anyone else experienced this: > >> Last week, one of my DBAs wanted to start a job > manually, > >> right-clicked on the job, got a step list back with > >> request to click on step to start on. Oddly enough, > the > >> list was not sorted numerically (as it usually is) but > >> alphabetically. How can this be fixed and does this > >> necessarily indicate any further problems? Thanks in > >> advance. > >> > >> > > > > > >. > >
- Next message: Tibor Karaszi: "Re: Priority Order On Where Clauses"
- Previous message: Ed Fultz: "Priority Order On Where Clauses"
- In reply to: kevin: "Re: SQL 2000 manual start job sort order"
- Next in thread: anonymous_at_discussions.microsoft.com: "Re: SQL 2000 manual start job sort order"
- Reply: anonymous_at_discussions.microsoft.com: "Re: SQL 2000 manual start job sort order"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|