Wednesday, March 21, 2012

Queries run faster with replication then without

Hello everyone,
I have a situation where I am using a Cursor to retrieve records from one table and inserting those records one at a time into another table. When I perform this action without replication, it takes longer to insert the 474 records into this table then it
does with replication. The table that is being inserted to is the table that is being replicated. It doesn't make sense. You would think that using replication would slow down this action. By contrast, if I use a simple INSERT statement without using a c
ursor (ie: Insert table2 select * from table1), the process runs much faster without replication then with replication. Any idea why?
Thanks!!
this is counter intuitive, unless the replication process is bringing the
database pages off disk and into cache thereby resulting in faster reads.
"Nupee" <anonymous@.discussions.microsoft.com> wrote in message
news:C5EDAB30-AB12-46BA-812B-1C0A6EB3562F@.microsoft.com...
> Hello everyone,
> I have a situation where I am using a Cursor to retrieve records from one
table and inserting those records one at a time into another table. When I
perform this action without replication, it takes longer to insert the 474
records into this table then it does with replication. The table that is
being inserted to is the table that is being replicated. It doesn't make
sense. You would think that using replication would slow down this action.
By contrast, if I use a simple INSERT statement without using a cursor (ie:
Insert table2 select * from table1), the process runs much faster without
replication then with replication. Any idea why?
> Thanks!!
|||Is it possible that it has something to do with the system procedures, and triggers that are added to the database through replication configuration? Either that or is there any documentation on the effects of replication of Cursors?
Thanks!!
-- Hilary Cotter wrote: --
this is counter intuitive, unless the replication process is bringing the
database pages off disk and into cache thereby resulting in faster reads.
"Nupee" <anonymous@.discussions.microsoft.com> wrote in message
news:C5EDAB30-AB12-46BA-812B-1C0A6EB3562F@.microsoft.com...[vbcol=seagreen]
> Hello everyone,
table and inserting those records one at a time into another table. When I
perform this action without replication, it takes longer to insert the 474
records into this table then it does with replication. The table that is
being inserted to is the table that is being replicated. It doesn't make
sense. You would think that using replication would slow down this action.
By contrast, if I use a simple INSERT statement without using a cursor (ie:
Insert table2 select * from table1), the process runs much faster without
replication then with replication. Any idea why?[vbcol=seagreen]

No comments:

Post a Comment