Viewing 15 posts - 451 through 465 (of 617 total)
They shouldn't. The query optimizer is pretty good. But you could try running it on a subset of your data and see how it does. In fact...
January 17, 2008 at 9:52 am
That is because you are using OUTER JOINS.
FROM [HOSTSQL].[dbo].[IN_RES] sm2
left outer join IN_GUEST sm1 on sm1.GUESTNUM = sm2.GUESTNUM
left join IN_PLAYR sm3 on sm3.PIMGPATH = sm2.GUESTNUM
where sm2.MEMTYPE !=''
When you use an...
January 17, 2008 at 9:36 am
I see 2 options for you.
1) Use inline views
SELECT DISTINCT l.omunique_id INTO #id
FROM oms_log_attribute l
JOIN oms_status_attribute u ON l.omunique_id = u.omunique_id
JOIN
( SELECT omunique_id, MAX(seqnumber) Max_SeqNumber
FROM oms_log_attribute
WHERE attr_key =...
January 17, 2008 at 9:27 am
antonio.collins (1/8/2008)
And it's just that for my usage (big decision support queries) a 50ms improvement isn't...
January 8, 2008 at 4:05 pm
I have to admit it took me a few read throughs to understand how you were using the numbers table. Its basically used as a list of positions in...
January 8, 2008 at 8:02 am
I'm certainly willing to accept that the number table and stringparser function work better than the LIKE code. Generally the tests I have done have been against fairly simple...
January 7, 2008 at 11:56 am
Actually there is a flaw in your logic. I agree if I am compairing '1' to '2,3,12' I'm going to get a false hit. However I'm compairing ',1,'...
January 7, 2008 at 9:17 am
Ok this is just an educated guess and I have absolutly no proof for it but maybe the DB engine will use the index on a field that not substantialy...
January 7, 2008 at 8:49 am
Antonio,
I don't know what to tell you. I've seen and done tests on this a couple of dozen times and the LIKE version has ALWAYS been faster.
Kenneth
January 7, 2008 at 7:53 am
Actually Antonio's first solution is going to be the better/faster one. Unless your list is enormous .. say 150+ items or more you are probably going to be better...
January 6, 2008 at 9:53 am
Ok I'm going to make a wild guess and say they are looking for a CASE statement to determine the weekday.
empid date val day name
-----------------------------------
1111 1/2/2008 1 Tuesday
1111 2/2/2008 1...
January 6, 2008 at 9:21 am
Jeff Moden (1/3/2008)
Ravi Patel (1/3/2008)
This feed is coming from one of our vendors, and they send the FULL data load on each run.
If by FULL data load you mean they...
January 3, 2008 at 10:30 am
create table emp (
empsal int null constraint emptest check (case when datepart(dd,getdate()) >= 10 THEN (CASE WHEN empsal IS NULL THEN 0 ELSE 1 END) ELSE 1 END = 1)
)
Basically...
January 3, 2008 at 8:06 am
Another option (assuming you have unlimited space) is to create a set of working tables .. or a working database. Load the entire data set and then run compairs....
January 2, 2008 at 4:04 pm
Ok IMHO the easiest and in my experience fastest way to handle this particular exercise.
DECLARE @CommaList varchar(8000)
SET @CommaList '1,2,3,4,5,6'
SELECT *
FROM YourTable
WHERE ','+@CommaList+',' LIKE '%,'+TableColumn+',%'
NOTE: Ok there is the limit of...
January 2, 2008 at 1:56 pm
Viewing 15 posts - 451 through 465 (of 617 total)