[dba-SQLServer] Undo Query

jwcolby jwcolby at colbyconsulting.com
Tue Jun 3 19:20:08 CDT 2008


Francisco,

Thanks for that.  It was just idle curiosity.  I really need 
to stay busy so that I don't get struck with that idle 
curiosity stuff.

I didn't time the initial query running nor the rollback, 
but it didn't seem to be markedly different one way or the 
other.

John W. Colby
www.ColbyConsulting.com


Francisco Tapia wrote:
> The process that is occurring is that the system is "rolling back" the
> transaction as it existed in the transaction log.  How quick depends on what
> disk the transaction log is on in order re-process it all.  I have noticed
> in my experience that rolling back an action does not take as long as doing
> something, but it does depend on the number of records processed etc. as
> always ymmv
> 
> --
> Francisco
> 
> On Tue, Jun 3, 2008 at 1:47 PM, jwcolby <jwcolby at colbyconsulting.com> wrote:
> 
>> Just idle curiosity, does an "undo query" happen at the same
>> rate as a "do query"?
>>
>> I started a query running to append records from a ninety
>> million record table to a table that contains a subset of
>> the fields.  Basically I have a denormalized source table
>> with name, name2, name3 etc fields.  Each of these have
>> fname, mname, gender, age etc.  Since these are denormalized
>> "family" records, there are fewer Name2 records than Name1,
>> fewer still Name3 etc.
>>
>> I neglected to put in a "where name2 is not null" clause and
>> 30 minutes into the second append I realized that.  I
>> canceled the query and it is still "undoing" the query.
>> Which led me to wonder the relative efficiency of "doing" vs
>> "undoing".
>>
>> No Indexes in place on the target table of course.
>>
>> Any ideas on the relative efficiencies?  Is undoing an
>> append much slower than the append?
>>
>> --
>> John W. Colby
>> www.ColbyConsulting.com
>> _______________________________________________
>> dba-SQLServer mailing list
>> dba-SQLServer at databaseadvisors.com
>> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
>> http://www.databaseadvisors.com
>>
>>
> 
> 



More information about the dba-SQLServer mailing list