There is a structure: CREATE TABLE IF NOT EXISTS `categories` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `parent_id` int(11) unsigned NOT NULL DEFAULT '0', `title` varchar(255) NOT NULL, PRIMARY KEY (`id`), ) ENGINE=MyISAM DEFAULT CHARSET=utf8; Query_1: SELECT * FROM `categories` WHERE `id` = 1234 Query_2: SELECT * FROM `categories` WHERE `id` = 1234 LIMIT 1
I need to get only one line. Since we use WHERE id=1234 (finding by PRIMARY KEY), it is obvious that the row with id = 1234 is only one in the whole table. After MySQL has found the string, will the engine continue searching when using Query_1?
Thanks in advance.
source share