I tried to run the following query in my Cloud VPS cPanel phpMyadmin

```
SELECT bankcode, bankname 
FROM newbankdetails 
WHERE 
    type='DB' AND
    bankcode IN ( SELECT drawingbankname 
                  FROM dd1 
                  WHERE entrydate BETWEEN '01/04/2014' AND '30/04/2014' 
                    AND paymentmode='DD' 
                    AND state='TAMIL NADU' )

```

It takes very very very long time nearly 5 to 6 hours and says out of time or keeps running for days and don't show any error also don't show results.

Whereas it works perfectly in my local machine xampp 

It happens only when working on large size tables like 12GB and around like that

How to speed it up and display the result as it displays instantly in localhost xampp