Performance
  
  Rows in base table  : ~62,000
  Rows in pivot table : 5,000
  Columns             : 50
  Sparseness          : 25%  (average columns per row)
  
  id attribute_name value    |   id attribute_001 attribute_002 ... attribute_050
  -- -------------- -----    |   -- ------------- -------------     -------------
  1  attribute_001  123      |   1   123
  1  attribute_023  321      |   2                312
  2  attribute_002  312      |
  2  attribute_050  33       |