Order tools table rows by row_index field in db