import - Uploading products from excel file -


i wondering best way of importing products database.

product names have unique sku's.

the excel file may contain existing sku's.

one way of doing import is:

  1. read record excel
  2. check sku existence in database table if exists, update or if not found, insert it

second way: 1. read record excel 2. check sku existence in database table if exists, delete (will surely change create_data, auto_id) or if not found, insert it

if upload 1000 records, there 1000 x 2 (update/delete + insert) queries fired on database.

is there other efficient solution?

thanks

the performant way option 1. joe r mentioned option 2 causes unnecessary database calls.

you make option though, in lot of cases deleting products probability.

you have delete or update option available 1 uploading data. example deleting favourable if have lot of excess data in database want remove.


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -