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 ««12

Stored procedure recompile is very slow Expand / Collapse
Author
Message
Posted Monday, March 9, 2009 9:40 AM


Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, February 10, 2011 8:32 AM
Points: 23, Visits: 118
Ok I found it. We added a few columns to the results and did a self join on a view 3 times to get the data. But that's just the entrance to the rabbit hole. The view is built on another view and the column joined in the self joins is in down in the other view (which is probably built on other views). Blech. Thanks everyone for your comments.
Post #671659
Posted Monday, March 9, 2009 9:46 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 1:03 PM
Points: 15,729, Visits: 28,132
See, you might get to 80 tables too.

Glad you found it.


----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #671669
Posted Monday, March 9, 2009 10:48 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Saturday, August 23, 2014 10:43 AM
Points: 942, Visits: 1,064
michael ham (3/9/2009)
Ok I found it. We added a few columns to the results and did a self join on a view 3 times to get the data. But that's just the entrance to the rabbit hole. The view is built on another view and the column joined in the self joins is in down in the other view (which is probably built on other views). Blech. Thanks everyone for your comments.


Urg .. one reason I hate views .. reminds of Microsoft Access .. I had to manage a application where they had built query on top of query of top of query. In some cases going down 10 levels; then they complained to me whey their application was slow grrr. Is there anyway in SQL Server to force it so Developers can't keep referecing view with in view with in view?

Mohit.


---

Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN.
Microsoft FTE - SQL Server PFE

* Some time its the search that counts, not the finding...
* I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing.


How to ask for help .. Read Best Practices here.
Post #671739
Posted Monday, March 9, 2009 11:05 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Thursday, June 5, 2014 10:54 AM
Points: 9,902, Visits: 9,480
There's nothing wrong with Views. It's how you use them that matters.

-- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoung
Proactive Performance Solutions, Inc.
"Performance is our middle name."
Post #671761
Posted Monday, March 9, 2009 12:01 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Saturday, August 23, 2014 10:43 AM
Points: 942, Visits: 1,064
Aye .. Just reminds me of my horror days from MS Access programming heh.

I have yet to have a developer try to build view on top of a view ... well I had one developer I was able to talk him out of it o.O...

Mohit.


---

Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN.
Microsoft FTE - SQL Server PFE

* Some time its the search that counts, not the finding...
* I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing.


How to ask for help .. Read Best Practices here.
Post #671827
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse