PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.databases.mysql > MYSQL INSERT limit
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
MYSQL INSERT limit

Réponse
 
LinkBack Outils de la discussion
Vieux 01/12/2008, 18h41   #1
rtconner
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut MYSQL INSERT limit

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?
  Réponse avec citation
Vieux 01/12/2008, 19h00   #2
Álvaro G. Vicario
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: MYSQL INSERT limit

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
--
  Réponse avec citation
Vieux 01/12/2008, 19h04   #3
J.O. Aho
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: MYSQL INSERT limit

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
  Réponse avec citation
Vieux 01/12/2008, 21h39   #4
rtconner
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: MYSQL INSERT limit

Thank you guys, I have a good idea of what I need to do to handle this
now.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h08.


Édité par : vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08335 seconds with 12 queries