synchronizing message(query) with the table ordering