I want to upload a csv file into mysql database through php. I already have more than 20,000 records in database. now when i upload csv file containing around 1000 records in it, it takes very much time to upload on local machine itself.
Please help and suggest optimized query to upload csv file into mysql database having large number of records.
Does number of records affect performance of database..??
EDIT from comments
Currently used code:
LOAD DATA INFILE '$file_name' IGNORE
INTO TABLE import
FIELDS TERMINATED BY '|'
LINES TERMINATED BY '\n'
IGNORE 1 LINES (@srno,@customer_name,@date,@mobno,@city,@state,@type,@telecaller)
SET customer_name=@customer_name,date=@date,mobno=@mobno,city=@city, state=@state,type=@type,telecaller=@telecaller,datetime='$datetime';