Go to Site administration>Development>XMLDB editor
load and edit lib/db
Try to drag and drop tables to change sortorder
Click on the d&d icon and use quick move dialogue to move element
Reload page and make sure the order was saved
Edit any table and try to do the same with fields, keys and indexes (table upgrade_log for example has several keys and several indexes)
implementation of sortable list from MDL-51803 in core in XMLDB editor