Viewing 15 posts - 31 through 45 (of 824 total)
I should add that as long as the seek predicate on t1 is indexed and all the required columns are included that should get you an index seek on...
August 3, 2009 at 1:06 pm
If I understand what you are getting at you should use a NOT EXISTS query like this:
select t1.col1,
t1.col2,...
from t1
where not exists
(
select *
from t2
where t1.PkCol = t2.FkCol
)
This will return all...
August 3, 2009 at 12:54 pm
We used to use Database Mail, but stopped for several reasons. We now just write events to the Windows Event Logs and then use Nagios to scan them and...
August 3, 2009 at 12:20 pm
Yep, restores are all about the I/O, and possibly network if you are restoring across a network.
August 3, 2009 at 12:15 pm
The problem is that archiving typically isn't something that can just be thrown together quickly. It takes careful planning and testing to get it right. If this is...
July 14, 2009 at 3:34 pm
Well, that article describes several ways to approach the problem, but without knowing the details it's impossible to say.
That article addresses the situation where the duplicates are completely duplicates, more...
July 14, 2009 at 3:27 pm
The indexes created on a view are completely separate from the indexes on any of the base tables the view queries. The first index that MUST be created on...
July 14, 2009 at 3:19 pm
NULL is undefined. It's the absence of a value. A blank is a value, what it might mean and when it is acceptable is entirely up to the...
July 2, 2009 at 2:00 pm
Try something like this:
select s.id_state, t.name
from
(
select id_state
from towns
group by id_state
having count(*) > 1
)s
join towns t
on s.id_state = t.id_state
July 1, 2009 at 12:37 pm
This is a super simplified version, but I think you should get the idea...
create table student (firstname varchar(25) primary key)
go
create table class (className varchar(25) primary key)
go
...
July 1, 2009 at 12:29 pm
This is a weird one...
would something like this do the trick?
declare @Total decimal(18,2)
select @Total = sum(number)
from #temp
create table #temp2
(
customer varchar(15),
number int,
Ranking int
)
insert #temp2
select customer,
Number,
ranking = row_number() over(order by number desc)
from...
July 1, 2009 at 10:47 am
Paul White (6/25/2009)
DCPeterson (6/25/2009)
A clustered index is ALWAYS unique.
Was this reply prompted by my post?
If so, I think you might have missed what I was driving at 🙂
If you get...
July 1, 2009 at 8:11 am
Well sure, but in my tests except performs better than the NOT IN equivalent... Plus that does nothing to explain why it takes so much longer when you add...
June 25, 2009 at 12:19 pm
At first blush this looks like a case of a bad execution plan. Can you post the execution plan?
June 25, 2009 at 10:35 am
The thing to look for in the execution plan (the one with the index hint) is that there will be a nonclustered index seek and then a bookmark lookup to...
June 25, 2009 at 9:44 am
Viewing 15 posts - 31 through 45 (of 824 total)