Viewing 15 posts - 21,256 through 21,270 (of 22,219 total)
I got them, but both were tagged as potential spam by our filter. Maybe that's where yours are?
"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
January 15, 2008 at 6:11 am
AND, can't believe I forgot this, you need to look at the selectivity of the data in those columns to be sure an index will work well.
"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
January 14, 2008 at 12:28 pm
First question I'd ask is, what are the additional search criteria? That will affect the index. Also, do you have clustered indexes already on these tables? If so, what columns?...
"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
January 14, 2008 at 12:27 pm
From BOL:
Avoid using float or real columns in WHERE clause search conditions, especially the = and <> operators. It is best to limit float and real columns to > or...
"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
January 14, 2008 at 12:19 pm
The problem with floats is that they are imprecise, by definition.
Sorry about the bit of misdirection. I used it against a decimal several times with no issue. Works well in...
"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
January 14, 2008 at 11:58 am
Yes, you need to add wild cards. Instead of simply
LIKE '42'
make it instead
LIKE '42%'
"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
January 14, 2008 at 11:21 am
There are a number of third party tools that can do this, for example Embarcadero's RapidSQL. You can also simply right click on the tables and get it for yourself....
"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
January 14, 2008 at 11:17 am
Yes, that's exactly the type of auditing function that I had understood the OUTPUT function to be useful for. I just hadn't made the leap to using it with 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
January 14, 2008 at 8:21 am
Here we have a double edged sword. On the one side, I've got a more effecient tool to use in my queries. On the other side, you just handed me...
"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
January 14, 2008 at 8:12 am
I knew of the OUTPUT clause, but I'd only really thought of it for stuff like auditing. This is really useful. So, if you had a multi-row insert, you'd just...
"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
January 14, 2008 at 7:43 am
You'd use the SCOPE_IDENTITY like this:
INSERT INTO table
(Desc,UpdateDate,Whatever)
VALUES
('My Description','1/14/2007','Something)
SELECT SCOPE_IDENTITY()
That would insert a row into the table and then give you the identity value generated by that table from 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
January 14, 2008 at 6:39 am
Yeah, our company is weird about working from home too. I'm doing it today because a ton of snow was dumped on us. As much as I like my job,...
"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
January 14, 2008 at 6:30 am
Assuming I understood the question, if you're asking how to determine what the last identity value inserted was is to use the SCOPE_IDENTITY() function. This returns the last Identity value...
"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
January 14, 2008 at 6:20 am
We're only supposed to work 40 hours a week too, but we're also on call. I worked a good two-three hours this weekend because of some problems in production. It'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
January 14, 2008 at 6:08 am
While I still think manipulating XML in 2000 is a waste of time, that's a very good idea. If you absolutely HAVE to do it, taking advantage of what you...
"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
January 14, 2008 at 5:46 am
Viewing 15 posts - 21,256 through 21,270 (of 22,219 total)