fix the performance issue of duplication detection in lab/src/import2db.py