Improve cardinality, detect duplicated fields after creating tables