Re: Memory Problem with 1 DB. Other DB ok
All of these take a tiny amount of memory, time, etc in MySQL (for the TABLE you have):
* The INSERT you gave,
* SELECT MAX(ID) from WP_USERS; -- It will use an index.
* SELECT ID FROM wp_users ORDER BY id DESC LIMIT 1; -- It will use an index.
I make this claim regardless of whether there are 10 rows, 2904656 rows, or a billion rows in the table. Each will take only milliseconds and not blow out any memory. At worst, the billion row table might need a _few_ disk hits because of the BTree depth.
Hence, I insist that it is not MySQL, but rather the "link" or ODBC that is at 'fault'. Is there any way to tune them?
As you point out, Toad has no problems. But that is because you are asking Toad for "LIMIT 1", not "TOP 1", correct?
Perhaps this site can help:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home