refactor the code of extract
change the db engine to myisam and add some index for fields
fix the query error