Viewing 15 posts - 6,406 through 6,420 (of 8,416 total)
Right. It took a fair amount of work to get to see the plans there, but I now see what you mean.
The APPLY version is much less efficient than...
January 11, 2010 at 5:49 am
About the 'internals'...
The first thing to realize is that the trick of generating a comma separated string using multiple assignments takes advantage of an undocumented quirk in SQL Server. ...
January 11, 2010 at 5:06 am
Welsh Corgi
This is a great example but what if:
Welsh Corgi
...the employee table had duplicate entries.
Use a CTE or derived table in place of the Employee table. A DISTINCT or...
January 11, 2010 at 2:48 am
On the toll-call proposal: I think it is important we remember whose idea it was and direct any royalty payments appropriately :laugh:
January 11, 2010 at 2:41 am
nguyennd (1/11/2010)
Why don't use SELF JOIN in this case? Is it simple than outer apply?
Why don't you try both and let us know what differences you find?
It is certainly possible...
January 11, 2010 at 2:38 am
I assume the percentage figures you quote are the cost % of the batch? I don't generally attach much value to those percentages, but it'd be great to see...
January 11, 2010 at 2:35 am
Tom.Thomson (1/10/2010)
Steve Jones - Editor (12/13/2009)
Deadlocks don't occur within a query, they are within a transaction when you are updating two objects.
They can't in theory occur within a transaction, they...
January 11, 2010 at 1:22 am
Mitch,
The code I posted was to demonstrate technique - it was not intended as a complete solution.
To be fair, I think you could easily have found the solution for yourself...
January 11, 2010 at 1:13 am
It's not always about the performance of one query.
Quite frequently, concurrency is more important, in which case a cursor is a fine choice.
January 10, 2010 at 5:28 am
A quick-and-dirty solution is to just add an extra period to each string during processing. Your script then runs without modification:
DECLARE @data TABLE (data VARCHAR(50) NOT NULL);
INSERT @data (data)...
January 10, 2010 at 5:17 am
Here's one way of obtaining the sort of results you seem to be after. It is based on data in the AdventureWorks sample database.
SELECT TOP (10)
...
January 10, 2010 at 5:07 am
The internal worktable created to hold a copy of the rows is not a normal temporary table and can't be accessed by users.
January 10, 2010 at 4:45 am
repent_kog_is_near (1/9/2010)
Will the buffer pool be allocated and unused? in the scenario of the Ent Edition and the other factors?
Normally, yes - but only in the circumstances I described....
January 10, 2010 at 4:19 am
Alvin Ramard (1/9/2010)
Hey, that gave me an idea. Maybe we should all add our phone numbers to our signature.
Indeed. i was thinking of an 0900 number that charges...
January 10, 2010 at 3:46 am
CirquedeSQLeil (1/9/2010)
January 9, 2010 at 8:15 pm
Viewing 15 posts - 6,406 through 6,420 (of 8,416 total)