Tuesday, May 14, 2013

[SQL Server Data Warehousing] Performance issue while Pivoting huge records and creating a view


I have a table1 with more than 300 columns and 90 million records.  I have 40 pivoted columns in this table.  I would like to remove the pivoted column from the table1 but I would like to have the data somewhere. So I have created a table2 with the 4 columns and load the data from table1 after un pivoting the required column. Now the table2 has more than 150 million records. Now I would like to create a view by combining the table1 and table2 to get the same like the table1 which had the pivoted column previously.  Because existing applications will need those pivoted columns. I would like to create a view after pivoting the table2 data and combining it with the table1 to get a complete view which has all the columns when it was before.


I am having performance issue like out of memory exception error while pivoting data from table2.  Is it a good idea to pivot more than 150 million records and creating as a view? Please suggest do we have any other best way to solve my requirement.


Note: Table2 has composite Primary key columns



Anand



.

social.technet.microsoft.com/Forums

No comments:

Post a Comment

Search This Blog