I am struck and breaking my head with the SQL query performance tuning for a table(dbo.batch_events) which contains 1,461 million records. Basically i need to pivot the val