ifsnop / mysqldump-php

PHP version of mysqldump cli that comes with MySQL
https://github.com/ifsnop/mysqldump-php
GNU General Public License v3.0
1.25k stars 300 forks source link

is there an option to split extended insert into specific number of rows? #238

Closed pelister closed 3 years ago

pelister commented 3 years ago

do we have an option to split the insert statements with extended insert option which includes several VALUES lists.

say we want to split 1000 rows of data into 4 INSERT with 250 VALUES list per INSERT

garas commented 3 years ago

You can use extended-insert and net_buffer_length options.

However it will limit INSERT statement max length, but not rows included in the statement as you wish.

pelister commented 3 years ago

You can use extended-insert and net_buffer_length options.

However it will limit INSERT statement max length, but not rows included in the statement as you wish.

This is perfect, I can increase the net_buffer_length and run few tests to fix a value that will split the entire data into 200 VALUES list per Insert. I checked the net_buffer_length and it is between Default Value - 16384 to Max Value 1048576. Thank You for pointing out this option.