Alan thanks, this would be a solution. I used another way to do it, because it would be too much to handle in a script.
We have about 20000 different item configurations, each with up to 30 attributes and up to 1500 configs per item configurations and 3 languages.
: http://ruegg.mediando.ch/images/bookmarks/mediando_web003.png

one page is set up for one item, each row in the grid is a specific item with specific attributes plus price, which make up the row.
Fix in the grid is only the item no on the left and the price on the right.
My solution for this solution was to create a stored proc which created the select for the grid from basically 3 tables (items, item_attr and prices), the colModel and the colNames and the result of this procedure is stored in a table.
At runtime I add the colmodel and colnames from this table to the javascript and I let again a stored proc execute the generated select in a coldfusion component.
This performs quite wll, I just have a few formatting problems. e.g. the right most price column is cut off, but that's another story.