Viewing 15 posts - 8,071 through 8,085 (of 15,381 total)
cgreathouse (6/6/2013)
The type on the timestamp column is datetime2(2)
Then that column could be a good candidate for a clustered index. It would certainly be better than on a GUID column....
June 6, 2013 at 10:34 am
dbman (6/6/2013)
My table structure is:
SalesID int Primary Key.
Company ...
June 6, 2013 at 10:10 am
This is very likely to be parameter sniffing.
http://sqlinthewild.co.za/index.php/2007/11/27/parameter-sniffing/%5B/url%5D
Your query itself also appears to have some of the performance issues discussed in the "catch-all" queries article.
http://sqlinthewild.co.za/index.php/2009/03/19/catch-all-queries/%5B/url%5D
Last but not least, be...
June 6, 2013 at 10:00 am
cgreathouse (6/6/2013)
I have a db running on an EC2 (Amazon AWS) instance. I have a table that has a uniqueidentifier column as the primary key. There is also...
June 6, 2013 at 9:55 am
It seems like your first step is going to have to be normalizing this data. If you can't normalize the base table you will need to do this in a...
June 6, 2013 at 9:46 am
prtk.raval (6/6/2013)
SET @merge_sql = (' MERGE into ' + @TgtDB + '.' + @TgtSchema + '.' +...
June 6, 2013 at 9:38 am
Jeff Moden (6/6/2013)
June 6, 2013 at 8:53 am
Dird (6/6/2013)
Sean Lange (6/6/2013)
iztec?itzik -_
Gotcha. But what do you mean by "But then the iztec way avoids disk reads"? Do you mean by creating the tally table on the fly?
June 6, 2013 at 8:48 am
This produces the results as stated in your post. Please notice how I created sample data in a readily consumable format. This makes it a lot easier for the people...
June 6, 2013 at 8:43 am
Dird (6/6/2013)
Sean Lange (6/6/2013)
Dird (6/5/2013)
I don't have to create this every time I need to use it. I keep it as a permanent table at all times.
But then the iztec...
June 6, 2013 at 8:29 am
nitha jen (6/6/2013)
SET @cursemcredits = ( SELECT SUM(credit)
...
June 6, 2013 at 7:56 am
Dird (6/5/2013)
Sean Lange (6/5/2013)
Dird (6/5/2013)
I would say that is a loop. A tally table can do this quite easily though.
But then you have to create some pointless table and populate...
June 6, 2013 at 7:47 am
Dird (6/5/2013)
Sean Lange (6/5/2013)
sk them how they would solve the standard Fizz Buzz problem in t-sql with no loops and no cursors.
Using recursion? or would you class it as a...
June 5, 2013 at 3:41 pm
Dird (6/5/2013)
floresg2 (6/5/2013)
He understood using a case statement but he had never used modulo (%). This was a guy with years of supposed SQL experience.
How often have you used...
June 5, 2013 at 3:38 pm
Also keep in mind that your calculation will get the sum of ALL rows in the update. In other words if you update 3 rows, you will get one row...
June 5, 2013 at 3:16 pm
Viewing 15 posts - 8,071 through 8,085 (of 15,381 total)