Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8374641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:57:59+00:00 2026-06-09T14:57:59+00:00

We all know that it’s better to use multiple inserts in ONE query than

  • 0

We all know that it’s better to use multiple inserts in ONE query than to run MULTIPLE queries. But, I don’t know upto how many these multiple extended values does Mysql support? I searched over net but didn’t find the correct answer. I’m just curious to know this.

Example,

INSERT INTO tbl_name VALUES(1, 'John Doe'), (2, 'Peter England'), ....

I remember when I was using some MVC framework where it was trying to fire hundreds/thousands of inserts in one query, I used to get some sort of error message like Mysql server has gone away.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T14:58:01+00:00Added an answer on June 9, 2026 at 2:58 pm

    The limit for multiple inserts, like the one you are talking about would be bound by the packet limit.

    See: http://dev.mysql.com/doc/refman/5.1/en/packet-too-large.html

    This will affect all query types, and not just insert.

    To add a little more context, the error you spoke of MySQL server has gone away would be a result of exceeding the packet limit. A quote from the page:

    You can also get these errors if you send a query to the server that
    is incorrect or too large. If mysqld receives a packet that is too
    large
    or out of order, it assumes that something has gone wrong with
    the client and closes the connection. If you need big queries (for
    example, if you are working with big BLOB columns), you can increase
    the query limit by setting the server’s max_allowed_packet variable,
    which has a default value of 1MB. You may also need to increase the
    maximum packet size on the client end. More information on setting the
    packet size is given in Section C.5.2.10, “Packet too large”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We all know that jagged array performs better than multi-dimensional array, but what about
We all know that there are many different selector combinations one can use to
As we all know that iPod touch is having less memory than iPhone, but
We all know that we're supposed to combine our CSS into one file, but
We all know that a hash table has O(1) time for both inserts and
as you all know that if we use flash object in web page in
We all know that a readonly reference type variable's reference can't change, but the
We all know that 42 is the answer to everything , but it's news
We all know that global variables are anything but best practice. But there are
We all know that for relational databases it is best practice to use numerical

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.