Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Remote Scan via Linked Server Expand / Collapse
Author
Message
Posted Friday, October 18, 2013 7:22 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, November 18, 2013 9:18 PM
Points: 51, Visits: 215
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?
Post #1506152
Posted Friday, October 18, 2013 9:50 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 2:28 PM
Points: 33,062, Visits: 15,174
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
Post #1506243
Posted Friday, October 18, 2013 3:26 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 11:44 AM
Points: 7,019, Visits: 12,915
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
Post #1506336
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse