|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
We use this syntax in several places in our system
INSERT INTO table (field1, field2) VALUES ('1','2'), ('3','4'); Sometimes also we use the ON DUPLICATE KEY UPDATE modifier. Someone has said to me that there is a limit when using this type of query. Like you can only insert 1000 rows at a time, and after that the query does not work anymore. I need to find out if this is true or not. Do any of you have an answer? |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
rtconner escribió:
> We use this syntax in several places in our system > INSERT INTO table (field1, field2) VALUES ('1','2'), ('3','4'); > > Sometimes also we use the ON DUPLICATE KEY UPDATE modifier. > > Someone has said to me that there is a limit when using this type of > query. Like you can only insert 1000 rows at a time, and after that > the query does not work anymore. I need to find out if this is true or > not. Do any of you have an answer? There's a general limit you might hit: http://dev.mysql.com/doc/refman/5.0/...too-large.html I don't know if there's an specify limit for updates. I've never heard so but that proves nothing ;-) -- -- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain -- Mi sitio sobre programación web: http://bits.demogracia.com -- Mi web de humor al baño María: http://www.demogracia.com -- |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
rtconner wrote:
> We use this syntax in several places in our system > INSERT INTO table (field1, field2) VALUES ('1','2'), ('3','4'); > > Sometimes also we use the ON DUPLICATE KEY UPDATE modifier. > > Someone has said to me that there is a limit when using this type of > query. Like you can only insert 1000 rows at a time, and after that > the query does not work anymore. I need to find out if this is true or > not. Do any of you have an answer? As far as I know, and it's not that much, but if what I'm thinking is right, it should be limited of the size of your bulk_insert_buffer_size variable, default value is 8MB, but can be increased to ~4G. -- //Aho |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Thank you guys, I have a good idea of what I need to do to handle this
now. |
|
![]() |
| Outils de la discussion | |
|
|