Viewing 15 posts - 21,106 through 21,120 (of 22,224 total)
I've stayed away from using functions, but the CROSS & OUTER apply statements work incredibly well with set based SELECT statements applied to the rows returned by the rest of...
"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
February 5, 2008 at 6:32 am
To do that automatically you can either buy a tool like Embarcadero Rapid SQL that will do it for you, write a program using SMO to walk each table generating...
"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
February 5, 2008 at 6:28 am
You're asking for improved methods of Row-By-Agonizing-Row (RBAR) processing. That type of processing is inherently slow because TSQL is set up & optimized for set based processing. You're almost guaranteed...
"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
February 5, 2008 at 5:46 am
Sorry that wasn't helpful. I thought that covered most everything. However, for drill down, one place I go is the Query Procesing Team blog. This is the Storage Engine team's...
"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
February 5, 2008 at 5:42 am
I've tested in 2008 and 2005. I also change the compatibility level of the database I was testing on and it worked on all of them, even 7.0. I'm not...
"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
February 4, 2008 at 1:03 pm
Did you mean to post this in the 2008 forum? If so, I tested your script on a 2008 database and it ran just fine. I'm not sure where the...
"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
February 4, 2008 at 11:15 am
I found Itzik Ben Gan's course on advanced TSQL very helpful. He covered all the new TSQL functionality in great depth. He's from Solid Quality Mentors.
"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
February 4, 2008 at 9:02 am
Have you performance tested both approaches? I think the CTE approach, especially the second one, not mine, should be much more effecient than loading data into a temp table.
"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
February 4, 2008 at 8:29 am
Automatic verification of changes to the scripts as you save them is a pretty large advantage. Refactoring object names is great. The Static Code Analysis is getting a lot more...
"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
February 4, 2008 at 6:19 am
If you can pass the data in as XML, you can use the XQUERY language in 2005 to pull the data out of it, exactly like a table. It looks...
"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
February 4, 2008 at 4:51 am
Most of the time, cursors just flat out run too slow. Rewriting the procedures to avoid the use of cursors is usually the best bet. Other than that, I'm not...
"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
February 4, 2008 at 4:43 am
This white paper from Microsoft is one of the best sources for this information.
"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
February 4, 2008 at 4:38 am
Itzik is the greatest.
It sounds as if you're doing some sort of data migration. If you can, you should look into, in some way, turning this into a bulk load....
"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
February 4, 2008 at 4:35 am
The long answer is: it depends.
Let's assume that the 8 column table is supposed to be retained in it's entirety and that you're supposed to create that, load it, and...
"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
February 4, 2008 at 4:28 am
As you've already seen, no they're not both the same. Yes, the number of physical reads is the same, but you'll find that this procedure recompiles, a lot, probably every...
"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
February 4, 2008 at 4:21 am
Viewing 15 posts - 21,106 through 21,120 (of 22,224 total)