SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Query Stored Procedure Behaviour


Query Stored Procedure Behaviour

Author
Message
sivaramakrishnan G
sivaramakrishnan G
Grasshopper
Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)

Group: General Forum Members
Points: 20 Visits: 92
Dear All,
I have created stored Procedure which executes 1:20 (mm:ss) in development envioronment.The same Procedure and Table index script every thing promoted to Stage Server there its taking 4 min to Process the same set of logic and same set of records.Both Environment SQL Server 2012 Configured(Microsoft SQL Server Standard (64-bit)).

Even I have tried take back up of my Dev database to Staging and Ran the same procedure its taking 1:20 no change.I have check both Server settings and DB Settings level no issue.

I have take the Query from the Stored Procedure and executed one by one.In the new database the behaviour of the Query is different.Each and every time the Execution plan giving different recommendations.But for the DEV Database restored in the Staging the plan indicating Index Seek.

Kindly give your views in what context i have to check in Database.

Regards
Siva
Steve Hall
Steve Hall
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2824 Visits: 11564
Would it be possible to post the Stored Procedure code, table definitions and Query Plans from both of the environments?

Steve Hall
Linkedin
Blog Site
Sean Lange
Sean Lange
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26159 Visits: 17539
As a shot in the dark...have you updated statistics? That could very likely be the issue here. How much data is being affected by this query?

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Modens splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
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