Mysql Query Take Longer To Prcoess On My Dedicated Server Than My Local Server One of my MySQL queries takes a very long time to process on my live server compared with my development server. My live server (Windows dedicated server) is more powerful than my local (development) server. Both databases, tables, engine, columns, indexes all are same/identical on both servers.

On my development server (local) the query takes only milliseconds (less than a second) where on my dedicated server it takes 4-5 seconds.

On my dedicated Server I noticed in Task Manger that msqld is running by a command line which defined my.ini file:



And this is the my.ini file contents on that location:



Is there anything in my.ini that I can change to boost the speed?

Here are the outputs from explain as requested:

Dedicated server

id  select_type table   type    possible_keys   key key_len ref rows    Extra
1   SIMPLE  PSCThana    ALL ThanaID,UpazillaID  NULL    NULL    NULL    509 Using where
1   SIMPLE  PSC15ALL    ref STD_ROLL,THANA  THANA   18  siamit.PSCThana.ThanaID 2648    Using where


Local Server

id  select_type table   type    possible_keys   key key_len ref rows    Extra
1   SIMPLE  PSCThana    ALL ThanaID,UpazillaID  NULL    NULL    NULL    509 Using where
1   SIMPLE  PSC15ALL    ref STD_ROLL,THANA  THANA   18  siamit.PSCThana.ThanaID 2837    Using where
There are other things that can come into play when dealing with a production vs a development environment such as fragmentation/load/locks/amount of data/etc. I would first start by comparing the plans in mySQL using EXPLAIN. This will give you more information as to what the problem is.