Viewing 15 posts - 21,961 through 21,975 (of 22,219 total)
Sure, it's a common table expression. It's new in 2005. They function similar to derived tables, but can be referenced multiple times in a give procedure and, most importantly for...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 5, 2007 at 11:15 am
And the recursive section of BOL has an example doing almost exactly what is being requested here. You ought to be able to take the example & make 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
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 5, 2007 at 11:00 am
We took a script from SQL Server Central that checked fragmentation and then decided whether or not to reindex or defragment (great script, used it for years, I'm not sure...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 5, 2007 at 10:54 am
Oops. Did a bit more testing & found you need to add this at the end:
OPTION(MAXRECURSION 0);
Or you could...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 5, 2007 at 10:46 am
No promises on performance but:
DECLARE
@BeginDt DATETIME;
DECLARE @EndDt DATETIME;
SET
@BeginDt = "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood" Author of:
- Theodore Roosevelt
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 5, 2007 at 10:40 am
I had to meet a similar need. We figured out that there were only a few constants. So, instead of trying to design a storage engine to get at data...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 5, 2007 at 10:27 am
100% agreement with everything you said and thank you for saying it. Situational awareness has to extend past one's self. If something looks bad, it probably is. Do something about...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 5, 2007 at 5:38 am
I'd move this kind of processing into SSIS. You've really stepped outside what TSQL is meant to do with all the file I/O. You'll probably get the same or better...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 4, 2007 at 7:04 am
Thank you. Yes, that is on the list as a possibility. I'm just trying to explore the space and I'm not finding much in the way of documented approaches.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 3, 2007 at 11:04 am
True, and it's something I'm looking into, but it makes me even more nervous. As the article you link to states, if the app isn't processing this information as fast...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 3, 2007 at 9:21 am
That would eliminate any chance of holding locks, but it will put more of a load on tempdb since table variables are stored there.
I'm not really looking to radically...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 3, 2007 at 5:19 am
I doubt this will give you everything you might need, but it will certainly get you started. These are Microsoft's Best Practices as implemented by their own consultants.
http://www.microsoft.com/technet/prodtechnol/sql/bestpractice/default.mspx
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 2, 2007 at 12:13 pm
We probably could use BCP and realize some performance improvements, definately. However, we're finding the performance is more than adequate, we've got it in Production as well as having tested...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 2, 2007 at 5:19 am
From this, you should try adding an index to the temp table, [#ProducedHour]. The first one I'd try, and you will need to test anything you do, would be to...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
March 30, 2007 at 6:51 am
#6Df65D3E is probably a statistic added to one of the tables because an index is needed for the query you're running and that index isn't there. The worktables are usually...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
March 29, 2007 at 10:39 am
Viewing 15 posts - 21,961 through 21,975 (of 22,219 total)