'Get all room_ids we\'ve ever known about, in ascending order of "size"'

@defer.inlineCallbacks
def get_all_rooms(self):

    sql = '\n                                                SELECT    room_id    FROM    current_state_events\n                                                GROUP    BY    room_id\n                                                ORDER    BY    count(*)    ASC\n                                '
    rows = (yield self._execute('get_all_rooms', None, sql))
    defer.returnValue([room_id for (room_id,) in rows])
