# Database size - different index size on replica node

**URL:** <https://forums.percona.com/t/database-size-different-index-size-on-replica-node/12505>\
**Category:** Percona XtraDB Cluster\
**Created:** [October 11, 2021, 5:58am UTC](https://forums.percona.com/t/database-size-different-index-size-on-replica-node/12505 "2021-10-11T05:58:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Milosz](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Milosz](https://forums.percona.com/u/Milosz)\
**Post date:** [October 11, 2021, 5:58am UTC](https://forums.percona.com/t/database-size-different-index-size-on-replica-node/12505/1 "2021-10-11T05:58:38Z")

</div>

Hi

Can anyone tell me why size (index count) of tables are different on this two nodes? devX are slave replica from master node.

**dev4**

dump: 90M wrz 8 21:15 dictor.sql

ENGINE TABLE\_NAME data\_length index\_length data\_free

InnoDB dict\_flights 66 0 5

root@hd-dev4:/scripts# cat /tmp/db\_list | grep dicto  
dictor dict\_flights 66

Table Non\_unique Key\_name Seq\_in\_index Column\_name Collation Cardinality Sub\_part Packed Null Index\_type Comment Index\_comment Visible Expression

| dict\_flights | 0 | PRIMARY | 1 | account | A | 1 | NULL | NULL | | BTREE | | | YES | NULL |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| dict\_flights | 0 | PRIMARY | 2 | campaign\_id | A | **188595** | NULL | NULL | | BTREE | | | YES | NULL |
| dict\_flights | 0 | PRIMARY | 3 | taken\_date | A | **189433** | NULL | NULL | | BTREE | | | YES | NULL |
| dict\_flights | 1 | idx\_campaign\_id | 1 | campaign\_id | A | **206905** | NULL | NULL | | BTREE | | | YES | NULL |

count:  
209597

**dev5**

dump: 90M wrz 8 21:15 dictor.sql

ENGINE TABLE\_NAME data\_length index\_length data\_free

InnoDB dict\_flights 72 7 2

root@hd-dev5:/scripts# cat /tmp/db\_list | grep dicto  
dictor dict\_flights 78

Table Non\_unique Key\_name Seq\_in\_index Column\_name Collation Cardinality Sub\_part Packed Null Index\_type Comment Index\_comment Visible Expression

| dict\_flights | 0 | PRIMARY | 1 | account | A | 1 | NULL | NULL | | BTREE | | | YES | NULL |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| dict\_flights | 0 | PRIMARY | 2 | campaign\_id | A | **204681** | NULL | NULL | | BTREE | | | YES | NULL |
| dict\_flights | 0 | PRIMARY | 3 | taken\_date | A | **204681** | NULL | NULL | | BTREE | | | YES | NULL |
| dict\_flights | 1 | idx\_campaign\_id | 1 | campaign\_id | A | **204681** | NULL | NULL | | BTREE | | | YES | NULL |

count:  
209597

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [October 11, 2021, 4:40pm UTC](https://forums.percona.com/t/database-size-different-index-size-on-replica-node/12505/2 "2021-10-11T16:40:03Z")

</div>

The index counts you are looking at are not actual numbers. They are estimates from statistics calculations. If you want to know the actual numbers, you need to run a real SELECT COUNT style SQL. I advise you run [pt-table-checksum — Percona Toolkit Documentation](https://www.percona.com/doc/percona-toolkit/LATEST/pt-table-checksum.html) on your master. This will detect any true differences on masters and slaves.

---

<div class="post-metadata">

**Author:** ![Milosz](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Milosz](https://forums.percona.com/u/Milosz)\
**Post date:** [October 24, 2021, 10:44pm UTC](https://forums.percona.com/t/database-size-different-index-size-on-replica-node/12505/3 "2021-10-24T22:44:45Z")

</div>

Hi

Amount of data on both tables are the same. Actually:

| count(\*) |  
±---------+  
| 220730 |

data size:

srv 4:  
83 MB  
±-------±-------------±------------±-------------±----------+  
| ENGINE | TABLE\_NAME | data\_length | index\_length | data\_free |  
±-------±-------------±------------±-------------±----------+  
| InnoDB | dict\_flights | 77 | 7 | 5 |  
±-------±-------------±------------±-------------±----------+  
1 row in set (0,00 sec)

srv 5  
77MB  
±-------±-------------±------------±-------------±----------+  
| ENGINE | TABLE\_NAME | data\_length | index\_length | data\_free |  
±-------±-------------±------------±-------------±----------+  
| InnoDB | dict\_flights | 77 | 0 | 5 |  
±-------±-------------±------------±-------------±----------+  
1 row in set (0,00 sec)
