MySQL Forums
Forum List  »  MyISAM

Re: Memory Problem with 1 DB. Other DB ok
Posted by: Rick James
Date: January 28, 2015 03:00PM

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:

Options: ReplyQuote

Written By
January 22, 2015 11:15PM
Re: Memory Problem with 1 DB. Other DB ok
January 28, 2015 03:00PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.