Viewing 15 posts - 7,786 through 7,800 (of 8,416 total)
Aaron,
In the simulations I have run, there are a number of small changes which need to be made to get good performance - the most important of which is a...
June 13, 2009 at 10:02 pm
Jeff Moden (6/13/2009)
June 13, 2009 at 6:46 pm
This is a daft QOD.
The correct answer is clearly SQL_VARIANT - and that isn't even listed as an option!!!
Paul
P.S. Hugo: you may find that your sarcas-ometer just exploded 😉
June 13, 2009 at 6:44 pm
rob.patterson (6/13/2009)
June 13, 2009 at 6:07 pm
You could, of course, also populate a table with all the valid values for the flag combinations and directly foreign key on that.
June 13, 2009 at 7:13 am
Sounds like a challenge 🙂
I can be done with FOREIGN KEYS as shown below. (I'm not saying it isn't without its own problems however).
As a side-benefit, this approach also...
June 13, 2009 at 7:05 am
distill (6/10/2009)
June 13, 2009 at 6:34 am
Aaron,
Thanks for providing the example code. I had tried to create one myself, but was struggling with the datatype for the PurchaseDateTime column on the CurrentPurchases table, as it...
June 13, 2009 at 6:01 am
Jeff Moden (6/12/2009)
June 13, 2009 at 4:51 am
I would usually write it like this:
--(FOR AFTER UPDATE trigger ON dbo.CurrentPurchases)
UPDATECur
SETdbo.CurrentPurchases.RunningTotalCost = Old.RunningTotalCost + Cur.Cost,
dbo.CurrentPurchases.PurchaseDateTime = DATEDIFF(ms, Old.PurchaseDateTime, Cur.PurchaseDateTime)
OUTPUT
Old.ProductTypeID,
Old.Cost,
Old.PurchaseDateTime
INTOdbo.Purchases
FROMdbo.CurrentPurchases Cur
JOINinserted ON inserted.ProductTypeID = Cur. ProductTypeID
JOINdeleted Old ON Old.ProductTypeID =...
June 13, 2009 at 1:31 am
rob.patterson (6/12/2009)
When page_count is less than 15, sometimes the avg_fragmentation_in_percent stays the same, sometimes it goes up.
The first eight pages for a structure are allocated from mixed extents (unless trace...
June 13, 2009 at 12:24 am
Andy Lennon (6/12/2009)
this is getting surreal.
Fish.
June 12, 2009 at 11:00 pm
KB,
Your script contains an error - there is an unwanted comma before each UNION ALL.
Having fixed that and run it, the query runs sub-second on my SQL 2K5 SP3 Dev...
June 12, 2009 at 4:51 am
Hey Rob,
Can you post the results that show you that fragmentation is increasing together with the query that generated the results please?
I want to make sure that you are comparing...
June 12, 2009 at 4:38 am
Viewing 15 posts - 7,786 through 7,800 (of 8,416 total)