Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 6

Displaying posts with tag: Stats (reset)

Improving InnoDB index statistics
+0 Vote Up -0Vote Down

The MySQL/MariaDB optimiser likes to know things like the cardinality of an index – that is, the number of distinct values the index holds. For a PRIMARY KEY, which only has unique values, the number is the same as the number of rows.  For an indexed column that is boolean (such as yes/no) the cardinality would be 2.

There’s more to it than that, but the point is that the optimiser needs some statistics from indexes in order to try and make somewhat sane decisions about which index to use for a particular query. The statistics also need to be updated when a significant number of rows have been added, deleted, or modified.

In MyISAM, …

  [Read more...]
Helping to Reduce Page Compression Failures Rate
Employee_Team +1 Vote Up -0Vote Down

When InnoDB compresses a page it needs the result to fit into its predetermined compressed page size (specified with KEY_BLOCK_SIZE). When the result does not fit we call that a compression failure. In this case InnoDB needs to split up the page and try to compress again. That said, compression failures are bad for performance and should be minimized.

Whether the result of the compression will fit largely depends on the data being compressed and some tables and/or indexes may contain more compressible data than others. And so it would be nice if the compression failure rate, along with other compression stats, could be monitored on a per table or …

  [Read more...]
MySQL DML stats per table
+5 Vote Up -0Vote Down

MySQL provides a level of statistics for your INSERT, UPDATE, DELETE, REPLACE Data Manipulation Language (DML) commands using the STATUS output of various Com_ variables, however it is per server stats. I would like per table stats.

You can achieve this with tools such as MySQL Proxy and mk-query-digest, however there is actually a very simple solution that requires no additional tools.
The following 1 line Linux command (reformatted for ease of reading) gave me exactly what I wanted, and it had ZERO impact on the database.

$ mysqlbinlog /path/to/mysql-bin.000999 |  \
   grep -i -e "^update" -e "^insert" -e "^delete" -e "^replace" -e …

  [Read more...]
New stats charts
+0 Vote Up -0Vote Down


If you’ve looked at your WordPress.com blog stats today, you might have noticed the charts look a little different. We’ve replaced the old proprietary chart object with Open Flash Chart, an open source alternative.  Charts now look like this:

(Though I can’t guarantee you’ll see numbers like that).

All the old charts are still available in more or less the same form.  And we’re hoping to explore some of the new possibilities Open Flash Chart has to offer – so keep an eye on your stats.  Like we had to ask.

And in case you …


  [Read more...]
April Wrap-Up
+0 Vote Up -0Vote Down


In April we introduced Instant Findability, TED video embeds, a springtime theme, a cool new domain, and reply-by-email for comments, now open to all. A pretty busy month, with more …


  [Read more...]
Stats in your time zone
+0 Vote Up -0Vote Down


When we sat down at an Austin cafe in 2005 and wrote the stats system, Matt and I had no idea what we were getting into. He created the databases and drew the little smiley face while I wrote the code. We had milk and cookies. It was really cute. We were naïve!

I swear it was Matt’s idea to store stats data as daily summaries in Universal Coordinated Time (UTC), which is why stats days have always ended at odd hours for non-Greenwichians. But even if I seem blameless, I failed to champion your cause soon enough. It is even more my fault than Matt’s.

And so today I present a gift. If you have set your blog’s time zone, …


  [Read more...]
Showing entries 1 to 6

Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.