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 7722031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:04:31+00:00 2026-06-01T04:04:31+00:00

This is Uday. I have a problem with the write performance with a small

  • 0

This is Uday. I have a problem with the write performance with a small innodb table.

    There is a table called "wlists" on my local machine(mysql 5.1.X).
    It has 5 attributes and has less than 1000 rows. 
    By default, innodb_flush_log_at_trx_commit is set to 1 ;

    Now the thing is that
    every insert/update it is taking 0.04 seconds, 
    this is horrible because i can do just 54K inserts per hour.

    When innodb_flush_log_at_trx_commit set to 2, its working fine. 

What to do to get the same performance with innodb_flush attribute set to 1 only..?

    Here are some other details that may help in addressing this:
    load on the machine       : Quite normal
    innodb_log_file_size      : 1MB
    innodb_buffer_pool_size   : 8MB
    innodb_thread_concurrency : 8 
    Query                     : update wlists set customer_id = 1000 where id = 300; 

I have tried different options like OPTIMIZE table, increasing the log buffer, checking the network latency but no one worked. I would be really thankfull to those who would help me here.

Here are the DESC and EXPLAIN of the table.

    mysql> DESC wlists ; 
    +-------------+--------------+------+-----+---------+----------------+
    | Field       | Type         | Null | Key | Default | Extra          |
    +-------------+--------------+------+-----+---------+----------------+
    | id          | int(11)      | NO   | PRI | NULL    | auto_increment | 
    | customer_id | int(11)      | NO   | MUL | NULL    |                | 
    | name        | varchar(45)  | YES  |     | NULL    |                | 
    | created     | datetime     | YES  |     | NULL    |                | 
    | modified    | varchar(255) | YES  |     | NULL    |                | 
    +-------------+--------------+------+-----+---------+----------------+
    5 rows in set (0.01 sec)

    mysql> explain select customer_id from wlists where id = 300 ;
    +----+-------------+-----------+-------+---------------+---------+---------+-------+------+
    | id | select_type | table     | type  | possible_keys | key     | key_len | ref   | rows | Extra |
    ----+-------------+-----------+-------+---------------+---------+---------+-------+------+
    |  1 | SIMPLE      | wishlists | const | PRIMARY       | PRIMARY | 4       | const         |    1 |       | 
    +----+-------------+-----------+-------+---------------+---------+---------+-------+------+-------+
    1 row in set (0.00 sec)

SELECT is working OK. Problem is only with the UPDATE/INSERT.

Regards,
UDAY

  • 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-01T04:04:32+00:00Added an answer on June 1, 2026 at 4:04 am

    innodb_flush_log_at_trx_commit set to 1 will always cause performance slowdown on writes because InnoDB will wait for the operating system to return with disk success after each operation. Though, note that the operating system will sometimes lie based on its own caching.

    But setting innodb_flush_log_at_trx_commit == 1 is also the only way to guarantee ACID and full data recovery (assuming the OS doesn’t lie too much). So it’s a tradeoff. The ideal way to deal with this is to have a battery-backed up storage system that has its own write caching. That way you get the advantage of write-caching without data recovery issues. Though of course you then have to make sure the battery backup is fully maintained, and you’ll have write speed issues when the battery goes through regular maintenance cycles.

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

Sidebar

Related Questions

This may be an unusual question, but are there any resources people have come
This problem has been bugging me since forever. I have an array and in
This is a weired problem, I have implemented simple quick sort as follows.. static
This has been a rather problematic issue on numerous occasions. We have alot of
this is my code that I write it but I want to use LINQ
This is a complex question, because there are a lot of moving parts. My
This code won't compile because there is an illegal reference to a static field.
This is my first time creating a PHP form that will run a MySQL
This might seem like a stupid question I admit. But I'm in a small
I've got this small question - given a bitmask of weekdays (e.g., Sunday =

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.