Comments

  1. Juan P. says

    Hello!

    Thank you for the info. I’m using mysql 5.1 and I think that innodb_stats_on_metadata is set to ON by default. Do you know how to include this variable en my.cnf (file section, etc)?

    Thank you!

  2. Stephane Combaudon says

    @gggeek: you’re right. Except that I don’t really see any use case for innodb_stats_on_metadata = ON, while having noatime is sometimes useful.

    @Juan P: you should include the setting somewhere in the mysqld section:
    [mysqld]
    innodb_stats_on_metadata = OFF

    That will take effect after a MySQL restart. As the setting is dynamic, you can also change it at runtime with SET GLOBAL as shown in the post.

  3. says

    @Stephane – there is a use case. Information_schema contains meta data with number of rows in the table, and average row length etc. These values (although coarsely generated) will potentially be more out of date without innodb_stats_on_metadata = ON.

  4. Stephane Combaudon says

    @Morgan: True. I don’t think it will ever be a problem as the values are always far from being accurate, but it’s worth mentioning.

  5. Vinodkumar Saravana says

    Hi

    after adding the below line in my.ini file, mysql not starting, please advise me…

    [mysqld]
    innodb_stats_on_metadata = OFF

  6. Stephane Combaudon says

    @Vinodkumar: which version of MySQL are you using? and which message do you have in the error log?

  7. Vinodkumar Saravana says

    I am using Mysql 5.0.45 and i didn’t see any error in the log file…:(

    Do you want me to share my.ini file with you?

Leave a Reply

Your email address will not be published. Required fields are marked *