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

Query Stored Procedure Behaviour Expand / Collapse
Author
Message
Posted Friday, February 28, 2014 5:48 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Yesterday @ 4:35 AM
Points: 14, Visits: 87
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
Post #1546278
Posted Friday, February 28, 2014 6:59 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 1:01 AM
Points: 1,539, Visits: 8,133
Would it be possible to post the Stored Procedure code, table definitions and Query Plans from both of the environments?

BrainDonor
Linkedin
Blog Site
Post #1546312
Posted Friday, February 28, 2014 8:57 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 7:01 AM
Points: 13,069, Visits: 11,909
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 Moden's 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)
Post #1546398
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse