Viewing 15 posts - 2,161 through 2,175 (of 4,080 total)
FROM SQLSERVER.SourceDatabase.dbo.Employee_Master Employee_Master
INNER JOIN DestinationDatabase.dbo.Prempl Prempl ON CONVERT(int,Employee_Master.Empno) = Convert(int,Prempl.fempno)
WHERE Prempl.fempno IS NULL
What is performance like on the base query, that you say is running? ...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 20, 2009 at 11:48 am
Yes, I know 😀
GROUP BY z.ZipCode, z.CountyName
Zip codes are just convenient distribution areas for the federal postal service. Counties are governmental boundaries defined by the states. ...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 20, 2009 at 11:40 am
It seems to me that this came up in another thread this spring, but I can't recall now whether the functions being compared to their stored proc counterparts were ITVFs...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 20, 2009 at 10:11 am
Yes, there is a world of difference between inline table-valued functions and multi-statement table-valued functions. I believe that stored procedures execute faster than ITVFs, but dang if the...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 20, 2009 at 8:44 am
This is unreliable under SQL2000. See here.
The identity values that are generated depend on the position of the GetIdentity() function in the query tree (showplan), which may...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 20, 2009 at 8:27 am
I can't find any contrary authority to that, and I hadn't realized what parallelism would do to the IDENTITY function, so let's play it safe. Here is a...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 20, 2009 at 8:05 am
Steve is right, sorry I forgot to mention that.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 20, 2009 at 7:59 am
Hey Seth,
From somewhere I got the idea that by using an ORDER BY in the load of data to the temp table, I was in fact making sure the...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 20, 2009 at 7:25 am
You need to examine the final query which is to be executed. It is obviously returning no rows when it runs. I can't see your...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 20, 2009 at 7:16 am
Dave's right. What you are doing is usually done in a stored procedure. You can direct output from the stored procedure to a table using...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 20, 2009 at 7:11 am
You've been watching Johnny Depp in "Charlie and the Chocolate Factory" haven't you? 😛
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 19, 2009 at 9:35 pm
Couldn't test these, but the idea is to make one pass to take your totals and store them in a temp table that has a sequence number you can test....
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 19, 2009 at 9:30 pm
Even a blind squirrel finds some nuts, Jack. 😀
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 19, 2009 at 9:05 pm
You say "probably" heaviest, which means you haven't tested it.
Why not set up a test of 100000 inserts into a dummy table and see how much...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 19, 2009 at 8:15 pm
The most efficient in terms of CPU cycles is probably the following:
dateadd(day,datediff(day, 0,getdate()),0)
This strips hours, minutes, seconds and milliseconds from the date. Just replace GETDATE() with the name...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 19, 2009 at 8:10 pm
Viewing 15 posts - 2,161 through 2,175 (of 4,080 total)