Query plan is different in master and slave

Hello,

I was working on query optimization, during which I found that query plan on master and slave is different. Mysql version is same on both the servers. On Master it takes around 6 seconds to execute whereas in slave it takes around 1 second.

Only difference is query plan, rest all is same.

mysql version: 5.6.21

Hi ikonrao;

I would try running analyze table on both the master and slave and see if it matches after that. You could also rebuild the table with pt-online-schema-change for an “online” variation.

-Scott