Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Remote Scan via Linked Server


Remote Scan via Linked Server

Author
Message
JohnDBA
JohnDBA
Valued Member
Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)

Group: General Forum Members
Points: 54 Visits: 232
Hi Gurus,
I am having an issue with a query not using the cluster index. It is running a full scan. It updates 1 record at a time, but it is taking about 3 seconds per record. We have to process a lot of records and it will take approximately 28 hours to process all of those records.

The query updates via Link Server:
Server a = SQL Server 2008 R2
Server b = SQL Server 2000 (Linked Server/Remote Server)

Note:
Indexes and statistics are up to date.
Dynamic parameter is configured correctly at the provider level.
User elevated permissions configured correctly.

Any suggestions?
Steve Jones
Steve Jones
SSC-Dedicated
SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)

Group: Administrators
Points: 36174 Visits: 18751
You'll have to provide some code and perhaps an execution plan to understand what you're doing here.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
LutzM
LutzM
SSCertifiable
SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)

Group: General Forum Members
Points: 7001 Visits: 13559
There are several issues:
1) "a query not using the cluster index. It is running a full scan."
A "full scan" (of the table) acually returns all data from the clustered index. So this index is used. You might refer to a scan operation where a seek is expected. But that's just guessing...

2) "It updates 1 record at a time,..."
This sounds like a c.u.r.s.o.r. *cough* being involved. With such a "RBAR"-scenario you'll never going to get the performance improved.

3) "... but it is taking about 3 seconds per record."
There is definitely something going wrong. A single row update must not take 3sec under "normal" conditions.
But to find the root cause might take a while since there are quite a few candidates involved: the query itself, network issues, locking / blocking, triggers,...

Once we know what you're trying to do (by looking at some code and sample data) we might be able to help you and improve the performance by magnitudes. So please help us help you by providing some ready to use sample data as described in the first link in my signature.



Lutz
A pessimist is an optimist with experience.

How to get fast answers to your question
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search