Split tables, set ids