Fixed statistics table primary key issue