Viewing 11 posts - 1 through 11 (of 11 total)
Took your initial example and modified it so I could use a pivot with a dynamic set of cols, not sure how much of a hit I'm taking by using...
October 30, 2014 at 9:14 am
That's f***ing impressive, I have been working with various langs for more than 15 years and usually you can gauge how complex something is and how much code it might...
October 29, 2014 at 3:01 pm
Keep in mind that the slow query may extend passed your t-sql here, it could be a result of poorly placed indexes, not enough indexes, fragmentation, the list goes on...
June 10, 2014 at 10:30 am
Also, are you distinguishing between IN (val1, val2, val3, ...) and IN (SELECT ...), which are processed completely differently?
Yes, this is what I was referring to when I mentioned joins
June 10, 2014 at 10:26 am
believe that I'm attempting to do the same thing. Are you attempting to something along these lines?
DECLARE @execquery AS NVARCHAR(MAX)
SELECT column1, column2 INTO #TempTable1 FROM table WHERE item1 =...
June 10, 2014 at 9:50 am
In clauses are generally slower because people write them instead of joins, so they don't scale well, but in your example they are prob faster than separate or statements.
June 9, 2014 at 3:07 pm
Take one of the slowest queries and add top 1000 to it and run it without the unions and start picking away the pieces to which is the bottleneck. Change...
June 9, 2014 at 2:32 pm
I noticed strange behavior using out args with defaults and out arg does not get set.
create proc dbo.BLAH(@ClassId int = -1 out)
if(isnull(@NavClassId, 0) <= 0) set @NavClassId = -1...
June 9, 2014 at 12:49 pm
I don't think you understand my question as it is not a simple select insert, and of all the examples I've seen I can't find one that does an insert...
June 9, 2014 at 9:10 am
A better question might be is there a difference between count(*) and count(col).
Many people don't know the subtleties between them.
March 11, 2010 at 8:40 am
The purpose of this was to have flow control during a db upgrade.
I wanted to log that an upgrade file had been run, if unsuccessful the upgrade process would rollback...
March 2, 2010 at 9:08 am
Viewing 11 posts - 1 through 11 (of 11 total)