Viewing 15 posts - 19,816 through 19,830 (of 22,219 total)
The thing to remember is, to all intents and purposes, the clustered index, is the 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
August 2, 2008 at 3:46 am
You'll have to use dynamic SQL. Put everything into a string and concatenate the table name.
Here's an example (uncompiled, so test it):
DECLARE @mystring nvarchar(max)
SET @mystring = 'CREATE TABLE dbo.' +...
"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
August 2, 2008 at 3:42 am
Why would you need a cursor? It sounds like a simple INSERT... SELECT DISTINCT... will do the job nicely in a single step. Avoid cursors any where and every where.
"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
August 2, 2008 at 3:37 am
Well, not to give competition to Steve... OK, it won't, but there is
"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
August 2, 2008 at 3:29 am
And that's why we've only had to do the FULL SCAN in a few places and on a somewhat irregular basis. Most indexes, most of the time, if they were...
"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
August 2, 2008 at 3:21 am
Sweet. Nice security. No one will ever know that we're running everything off an Access DB
"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
August 1, 2008 at 12:25 pm
Now that I'm thinking about it (and I'm also asking around) unless the database is only a single filegroup, it's unlikely that it would show up as an actual locked...
"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
August 1, 2008 at 11:51 am
Ooh. I hadn't thought of that.
It wouldn't show up as a database lock though, would 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
August 1, 2008 at 10:31 am
Trader Sam (8/1/2008)[hr
Guilty by association!
There you go...
I was at a meeting of our town Board of Health this week (they're trying to pass regulations on Outdoor Wood Furnaces). One...
"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
August 1, 2008 at 8:28 am
Hrmmm...
Unless this is the only table in the database, I'd be really shocked to see a database lock based solely on inserts to a single table. I'm guessing there's a...
"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
August 1, 2008 at 8:10 am
So I guess the guideline should be don't publish anything that can be linked to you that you wouldn't want published in the newspaper on the frontpage with your name...
"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
August 1, 2008 at 7:54 am
If TypeID and LangCode are the PK's that are meant to be used to link to the Object table (parent to child), then the Object table needs to also have...
"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
August 1, 2008 at 7:22 am
Last comment. If you google my name the first result is The Jack Corbett Guide to Topless Clubs, which is NOT me. You get me as the 5th...
"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
August 1, 2008 at 7:15 am
Once you pass a certain number of rows, the engine has to lock the table to be effecient. There's no getting around that fact. So, instead, you have to look...
"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
August 1, 2008 at 5:48 am
It's just a chapter out of a larger book. The information is likely to be good, but it could be pretty light.
"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
August 1, 2008 at 5:42 am
Viewing 15 posts - 19,816 through 19,830 (of 22,219 total)