Viewing 15 posts - 58,456 through 58,470 (of 59,067 total)
SELECT IDENTITY(INT,1,1) AS RowNum,*
INTO #yourtemptable
FROM #yourpermtable
Don't forget to add a primary key for speed and accuracy...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 21, 2006 at 11:47 pm
The author of the article wrote: "but using temporary table you are increasing disk activity since TV (Table Variable) is created in memory as opposed to Temp tables (created in...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 21, 2006 at 8:10 pm
Ummmm.... wanna tell me what version of SQL Server there was that didn't have cursors?
--Jeff Moden
Change is inevitable... Change for the better is not.
January 20, 2006 at 6:02 pm
Mike C,
Exactly right and great call. In fact, there's documented proof that table variables do use TempDB at the following web site and that there are some serious DISADVANTAGES to...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 19, 2006 at 7:45 am
Ah. Got it... very nice work around and thanks for the clarification on the xp_/sp_. The proc is actually listed as an sp_ in the Master DB but I guess...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 19, 2006 at 7:42 am
I'm thinking that those extra services take up some of the memory that would normally have been available to SQL Server on otherwise identical machines so I'm thinking you're right.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 18, 2006 at 8:30 pm
Like I said earlier... the hard knocks code will beat the pants off DTS either way. Thanks for the feedback Greg. You can get some extra performance out of SELECT...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 18, 2006 at 8:20 pm
>>>These temp tables can then be cursored...
I don't think you understood... the whole idea is to get rid of cursors and other RBAR methods in SQL Server.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 18, 2006 at 7:37 pm
>>But for this type of operation, I still think xp_execresultset is the best solution.
The original post was for "Eliminating Cursors" so I have to ask... how do you use it...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 18, 2006 at 7:34 pm
Just my humble opinion but I need to clear up some of the myths associated with Table Variables...
First, table variables don't live in memory anymore than temp tables...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 18, 2006 at 6:23 am
Thanks for coming back, John...
Yeah, I saw your original post where you said you had a table with all of the individual possible values. Your solution looks as though it...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 17, 2006 at 8:08 pm
Greg,
I don't know if having the Primary Key on the last column will affect performance especially for CLUSTERED keys... I'd have to study the format in BOL a bit.
However,...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 17, 2006 at 7:48 pm
Gail,
You wrote "ps, I don't understand your comment about pushing into a table without a pk. Best insert performance is a when inserting into a heap with no indexes".
Normally I...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 17, 2006 at 7:45 pm
Then something else went wrong, Gail. Perhaps there was a cross-join in the code. Perhaps you had a bad connection (it happens). Perhaps the linked server was not setup correctly. ...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 17, 2006 at 5:48 am
Not sure why that would matter at all but OK, whatever you say. I was thinking that maybe the servers had some different settings (like collation and memory allocation), a...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 16, 2006 at 9:22 pm
Viewing 15 posts - 58,456 through 58,470 (of 59,067 total)