# InnoDB and fragmentation

**URL:** <https://forums.percona.com/t/innodb-and-fragmentation/1607>\
**Category:** Other MySQL® Questions\
**Created:** [February 8, 2011, 10:16am UTC](https://forums.percona.com/t/innodb-and-fragmentation/1607 "2011-02-08T10:16:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xma01](https://avatars.discourse-cdn.com/v4/letter/x/ad7895/32.png) [@xma01](https://forums.percona.com/u/xma01)\
**Post date:** [February 8, 2011, 10:16am UTC](https://forums.percona.com/t/innodb-and-fragmentation/1607/1 "2011-02-08T10:16:25Z")

</div>

Hi,

I am lost trying to find out whether or not there is a way to measure fragmentation on InnoDB tables. The idea is not to rebuild tables where it is not needed.

Do you know the magic formula ?

Thank you

---

<div class="post-metadata">

**Author:** ![sterin71](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@sterin71](https://forums.percona.com/u/sterin71)\
**Post date:** [February 13, 2011, 5:50am UTC](https://forums.percona.com/t/innodb-and-fragmentation/1607/2 "2011-02-13T05:50:56Z")

</div>

What version of MySQL are you running?  
Since you need something like the Percona innodb\_check\_fragmentation patch if you are going to be able to see it.

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [February 15, 2011, 6:59am UTC](https://forums.percona.com/t/innodb-and-fragmentation/1607/3 "2011-02-15T06:59:37Z")

</div>

Use xtrabackup with stats if you can’t use Percona Server.
