0

we bought magento extension for uploading the products through excel sheet.

we are uploading Products using csv file. now uploading speed is too much less.

I am trying this query to increase upload speed of the upload :

TRUNCATE log_url; TRUNCATE log_url_info; TRUNCATE log_visitor;
 TRUNCATE log_visitor_info;  TRUNCATE dataflow_batch_import;
 TRUNCATE dataflow_batch_export; TRUNCATE index_event;  
 TRUNCATE report_event;

but i am getting this error :

#1701 - Cannot truncate a table referenced in a foreign key constraint 
(`database`.`index_process_event`, CONSTRAINT
 `FK_INDEX_PROCESS_EVENT_EVENT_ID_INDEX_EVENT_EVENT_ID` FOREIGN KEY
 (`event_id`) REFERENCES `database`.`index_event` (`event_id`)) 
0

I got a solution here :

SET FOREIGN_KEY_CHECKS = 0;

TRUNCATE table1;
TRUNCATE table2;

SET FOREIGN_KEY_CHECKS = 1;

credits : https://stackoverflow.com/questions/5452760/truncate-foreign-key-constrained-table

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy