Add topic time for ORDER BY and array keys from topic id