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

  • Home
  • SEARCH
  • 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 3498144
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:27:16+00:00 2026-05-18T12:27:16+00:00

I was reading this post on the MySQL performance blog. Under application tuning it

  • 0

I was reading this post on the MySQL performance blog.

Under application tuning it says:

First make sure you’re using transactions when doing updates

I am currently only using transactions in places where there are multiple inserts or updates at the same time. i.e. more than one table.

Should I therefore alter every UPDATE to change it into a transaction?

What is the difference between:

prepare sql
bind params
commit

and:

begin transaction
prepare sql
bind params
execute statement
commit transaction

in terms of what happens at the database level, that makes one faster than the other?

  • 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-05-18T12:27:17+00:00Added an answer on May 18, 2026 at 12:27 pm

    InnoDB runs in autocommit mode by default. What it means is that every query runs in it’s own transaction and gets commited at once. In InnoDB this mean writing data into two places on disk (don’t ask me for details – I’m writing from memory what I’ve read at MySQL Performance Blog once 😉 ).

    Now, if you do one update/insert/delete at a time, there’s not much performance to gain. However, if you do several consecutive update/inserts/deletes, you can save some hard disk time by bundling them into transaction, and then commiting all at once.

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

Sidebar

Related Questions

I just finished reading this post: https://developer.yahoo.com/performance/rules.html#flush and have already implemented a flush after
Reading this blog post about HttpOnly cookies made me start thinking, is it possible
This is a two part question, but I want to make sure the first
Reading this post has left me wondering; are nightly builds ever better for a
Well I was reading this post and then I came across a code which
I've recently heard about the CaptureStackBackTrace function by reading this post . I cannot
I've tried to do this several times with no luck. After reading this post
I was reading this thread/post: https://stackoverflow.com/questions/262298/windows-c-ui-technology and am also wondering about a non .NET
Ahoy Stack Overflow! This be mai first post... I'm attempting to identify users with
[Edit #3] - to anyone reading this question: do not under any circumstance use

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.