December 14, 2010 at 1:49 pm
GSquared (12/14/2010)
Brandie Tarvin (12/14/2010)
Days like this, I wonder why I even talk to you people. All that gutter-talk coming out of your mouths... My mom would wash all your mouths out with soap! 😛(Where's my halo? Self-righteous doesn't work without my halo, darnit!)
😀
It's okay. You're not talking to us. You're typing at us.
Does that mean your mom's willing to wash my keyboard out with soap?
Or is like the mother with the mute kid, washed his hands out with soap...
My keyboard needs to be washed too!!
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
December 14, 2010 at 1:50 pm
Craig Farrell (12/14/2010)
GilaMonster (12/14/2010)
Brandie Tarvin (12/14/2010)
(Where's my halo? Self-righteous doesn't work without my halo, darnit!)How long did it take you to forge your own halo, in between the lightning strikes, Gail? And... is that... rust?
I'll have you know that is a divinely gifted mithral/true gold alloy. It does not do something so mundane as 'rust'
:hehe:
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 14, 2010 at 1:51 pm
A Christmas fools joke for the office
http://www.thinkgeek.com/gadgets/electronic/ae83/
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
December 14, 2010 at 1:52 pm
Stefan Krzywicki (12/14/2010)
Wow. I was having problems with an older query taking too long, so I made what I thought was a little switch to begin making time improvements. I changed
FT
INNER JOIN (SELECT TypeID FROM AllTypes WHERE ParentType = 1) T
ON FT.TypeID = T.TypeID
to
WHERE FT.TypeID IN (SELECT TypeID FROM AllTypes WHERE ParentType = 1)
I thought I'd get a decent improvement, but the query went from 2 hours to 5 minutes! I had no idea it would be that dramatic. Thank you SQL Server Saturday where I first learned that concept.
Hmm, I usually take things from the WHERE clause to JOINS to make them run better. How does this run?:
FT
INNER JOIN AllTypes T
ON FT.TypeID = T.TypeID
AND ParentType = 1
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
December 14, 2010 at 1:54 pm
WayneS (12/14/2010)
Stefan Krzywicki (12/14/2010)
Wow. I was having problems with an older query taking too long, so I made what I thought was a little switch to begin making time improvements. I changed
FT
INNER JOIN (SELECT TypeID FROM AllTypes WHERE ParentType = 1) T
ON FT.TypeID = T.TypeID
to
WHERE FT.TypeID IN (SELECT TypeID FROM AllTypes WHERE ParentType = 1)
I thought I'd get a decent improvement, but the query went from 2 hours to 5 minutes! I had no idea it would be that dramatic. Thank you SQL Server Saturday where I first learned that concept.
Hmm, I usually take things from the WHERE clause to JOINS to make them run better. How does this run?:
FT
INNER JOIN AllTypes T
ON FT.TypeID = T.TypeID
AND ParentType = 1
Inquiring minds want to know.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
December 14, 2010 at 1:57 pm
CirquedeSQLeil (12/14/2010)
A Christmas fools joke for the office
Wow. That is truly evil. I don't think that would be appreciated at my workplace.
December 14, 2010 at 2:00 pm
Brandie Tarvin (12/14/2010)
CirquedeSQLeil (12/14/2010)
A Christmas fools joke for the officeWow. That is truly evil. I don't think that would be appreciated at my workplace.
I got a co-worker with that this morning. He was stumped for about 5 minutes. Rebooted and was still having problems. Buahahaha. He finally found it - and the joke is still great hours later.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
December 14, 2010 at 2:00 pm
WayneS (12/14/2010)
Stefan Krzywicki (12/14/2010)
Wow. I was having problems with an older query taking too long, so I made what I thought was a little switch to begin making time improvements. I changed
FT
INNER JOIN (SELECT TypeID FROM AllTypes WHERE ParentType = 1) T
ON FT.TypeID = T.TypeID
to
WHERE FT.TypeID IN (SELECT TypeID FROM AllTypes WHERE ParentType = 1)
I thought I'd get a decent improvement, but the query went from 2 hours to 5 minutes! I had no idea it would be that dramatic. Thank you SQL Server Saturday where I first learned that concept.
Hmm, I usually take things from the WHERE clause to JOINS to make them run better. How does this run?:
FT
INNER JOIN AllTypes T
ON FT.TypeID = T.TypeID
AND ParentType = 1
That was how I'd had it initially and went to the Subquery join to speed it up.
Unfortunately, it keeps getting slower and slower and I'm not sure why. I used to be able to run a third of a year at a time and it'd take an hour or so. Now it is taking 3 hours for a month.
The performance improvement I mentioned before isn't as great as I'd thought. That first time through was great, now it is taking quite a bit longer.
SQL Server had suggested performance improvements by adding an index to the destination table. I need to check that index for fragmentation. I also need to truncate the log again before it overwhelms the disk.
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
December 14, 2010 at 2:02 pm
Stefan Krzywicki (12/14/2010)
WayneS (12/14/2010)
Stefan Krzywicki (12/14/2010)
Wow. I was having problems with an older query taking too long, so I made what I thought was a little switch to begin making time improvements. I changed
FT
INNER JOIN (SELECT TypeID FROM AllTypes WHERE ParentType = 1) T
ON FT.TypeID = T.TypeID
to
WHERE FT.TypeID IN (SELECT TypeID FROM AllTypes WHERE ParentType = 1)
I thought I'd get a decent improvement, but the query went from 2 hours to 5 minutes! I had no idea it would be that dramatic. Thank you SQL Server Saturday where I first learned that concept.
Hmm, I usually take things from the WHERE clause to JOINS to make them run better. How does this run?:
FT
INNER JOIN AllTypes T
ON FT.TypeID = T.TypeID
AND ParentType = 1
That was how I'd had it initially and went to the Subquery join to speed it up.
Unfortunately, it keeps getting slower and slower and I'm not sure why. I used to be able to run a third of a year at a time and it'd take an hour or so. Now it is taking 3 hours for a month.
The performance improvement I mentioned before isn't as great as I'd thought. That first time through was great, now it is taking quite a bit longer.
SQL Server had suggested performance improvements by adding an index to the destination table. I need to check that index for fragmentation. I also need to truncate the log again before it overwhelms the disk.
Move it to one of the support forums, include the usual DDL and sample data, and we'll see what can be done with it.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
December 14, 2010 at 2:04 pm
GSquared (12/14/2010)
Stefan Krzywicki (12/14/2010)
WayneS (12/14/2010)
Stefan Krzywicki (12/14/2010)
Wow. I was having problems with an older query taking too long, so I made what I thought was a little switch to begin making time improvements. I changed
FT
INNER JOIN (SELECT TypeID FROM AllTypes WHERE ParentType = 1) T
ON FT.TypeID = T.TypeID
to
WHERE FT.TypeID IN (SELECT TypeID FROM AllTypes WHERE ParentType = 1)
I thought I'd get a decent improvement, but the query went from 2 hours to 5 minutes! I had no idea it would be that dramatic. Thank you SQL Server Saturday where I first learned that concept.
Hmm, I usually take things from the WHERE clause to JOINS to make them run better. How does this run?:
FT
INNER JOIN AllTypes T
ON FT.TypeID = T.TypeID
AND ParentType = 1
That was how I'd had it initially and went to the Subquery join to speed it up.
Unfortunately, it keeps getting slower and slower and I'm not sure why. I used to be able to run a third of a year at a time and it'd take an hour or so. Now it is taking 3 hours for a month.
The performance improvement I mentioned before isn't as great as I'd thought. That first time through was great, now it is taking quite a bit longer.
SQL Server had suggested performance improvements by adding an index to the destination table. I need to check that index for fragmentation. I also need to truncate the log again before it overwhelms the disk.
Move it to one of the support forums, include the usual DDL and sample data, and we'll see what can be done with it.
I second that notion
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
December 14, 2010 at 2:07 pm
CirquedeSQLeil (12/14/2010)
GSquared (12/14/2010)
Stefan Krzywicki (12/14/2010)
WayneS (12/14/2010)
Stefan Krzywicki (12/14/2010)
Wow. I was having problems with an older query taking too long, so I made what I thought was a little switch to begin making time improvements. I changed
FT
INNER JOIN (SELECT TypeID FROM AllTypes WHERE ParentType = 1) T
ON FT.TypeID = T.TypeID
to
WHERE FT.TypeID IN (SELECT TypeID FROM AllTypes WHERE ParentType = 1)
I thought I'd get a decent improvement, but the query went from 2 hours to 5 minutes! I had no idea it would be that dramatic. Thank you SQL Server Saturday where I first learned that concept.
Hmm, I usually take things from the WHERE clause to JOINS to make them run better. How does this run?:
FT
INNER JOIN AllTypes T
ON FT.TypeID = T.TypeID
AND ParentType = 1
That was how I'd had it initially and went to the Subquery join to speed it up.
Unfortunately, it keeps getting slower and slower and I'm not sure why. I used to be able to run a third of a year at a time and it'd take an hour or so. Now it is taking 3 hours for a month.
The performance improvement I mentioned before isn't as great as I'd thought. That first time through was great, now it is taking quite a bit longer.
SQL Server had suggested performance improvements by adding an index to the destination table. I need to check that index for fragmentation. I also need to truncate the log again before it overwhelms the disk.
Move it to one of the support forums, include the usual DDL and sample data, and we'll see what can be done with it.
I second that notion
Count this as a third
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
December 14, 2010 at 2:10 pm
Does this frighten anybody else?
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
December 14, 2010 at 2:10 pm
GSquared (12/14/2010)
Stefan Krzywicki (12/14/2010)
WayneS (12/14/2010)
Stefan Krzywicki (12/14/2010)
Wow. I was having problems with an older query taking too long, so I made what I thought was a little switch to begin making time improvements. I changed
FT
INNER JOIN (SELECT TypeID FROM AllTypes WHERE ParentType = 1) T
ON FT.TypeID = T.TypeID
to
WHERE FT.TypeID IN (SELECT TypeID FROM AllTypes WHERE ParentType = 1)
I thought I'd get a decent improvement, but the query went from 2 hours to 5 minutes! I had no idea it would be that dramatic. Thank you SQL Server Saturday where I first learned that concept.
Hmm, I usually take things from the WHERE clause to JOINS to make them run better. How does this run?:
FT
INNER JOIN AllTypes T
ON FT.TypeID = T.TypeID
AND ParentType = 1
That was how I'd had it initially and went to the Subquery join to speed it up.
Unfortunately, it keeps getting slower and slower and I'm not sure why. I used to be able to run a third of a year at a time and it'd take an hour or so. Now it is taking 3 hours for a month.
The performance improvement I mentioned before isn't as great as I'd thought. That first time through was great, now it is taking quite a bit longer.
SQL Server had suggested performance improvements by adding an index to the destination table. I need to check that index for fragmentation. I also need to truncate the log again before it overwhelms the disk.
Move it to one of the support forums, include the usual DDL and sample data, and we'll see what can be done with it.
I might if the other things I want to try don't pan out. As a daily query all 4 of these queries still run fine running a few days worth of rollup information in 1 to 3 minutes each and that's before the change I mentioned above. It is when I'm trying to redo older information in bulk that I'm having the problem and noticing the slowdown so it is clearly a size problem in addition to whatever else is going on.
How much sample data would I need to provide?
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
December 14, 2010 at 2:12 pm
CirquedeSQLeil (12/14/2010)
Does this frighten anybody else?
A missing image file? Not sure that "frighten" is the right word for that...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
December 14, 2010 at 2:13 pm
CirquedeSQLeil (12/14/2010)
Does this frighten anybody else?
All I see is a red x, so, no, it doesn't frighten me. 😛
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
Viewing 15 posts - 22,426 through 22,440 (of 66,712 total)
You must be logged in to reply to this topic. Login to reply