in reply to DBI - need for speed
The more I think about this, the more convinced I become that you'll be better off doing it all (or mostly) in SQL. First prepare a file containing just the group numbers, and load that into a table in your database (I'm presuming you have the permissions to do that). Then delete all the matching rows:
Then just insert them in a second statement:DELETE my_new_table WHERE exists ( SELECT 1 from part_group WHERE part_group.part_group = my_new_table.part_group )
I know it's not a Perl solution, but it's probably the fastest way (given many unwarraned assumptions about your data model, amount of data, etc. ;-)INSERT part_group(part_group) SELECT part_group FROM my_new_table
|
|---|