I need a row number index in my MySQL tables, based on ORDERing on a table column. I know about the
SELECT ... @curRow := @curRow + 1 AS row_number ...
trick which will output the row number; what I actually want, however, is for that row number to be written into the table as a persistent column. Performance is a critical issue. What is the best way of accomplishing this?
Originally asked by: Maximilian on Stack Overflow


Answers