title: limit in mysql with 10K record taking too much time to execute(fail every time)
body: <p>I am using MySQL database. I have a table that consist up to <strong>75K</strong> rows of data. I am using simple query to fetch data:</p>
  
  <pre><code>select * from mytable
  </code></pre>
  
  <p>It works fine, shows 75k rows in few seconds. I wanted to fetch some of these data I had used <code>limit 10000</code>. It got stuck every time. I need to optimize MySQL query for <strong>10k records</strong>.
  I am using query like this:</p>
  
  <pre><code>select * from mytable limit 10000
  </code></pre>
  
  <p>Give me some solution how to execute my query fast.</p>
  
  <p>my database structure is like that:</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `mytable` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `col1` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `col2` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `col3` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `col4` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `col5` int(11) NOT NULL,
  `col6` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `col7` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `col8` int(11) NOT NULL,
  `col9` int(11) NOT NULL,
  `col11` int(11) NOT NULL,
  `col12` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `col13` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `col15` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `col16` enum('0','1') COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `col17` int(11) NOT NULL,
  `col18` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `col19` enum('0','1') COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`,`col2`,`col3`,`col4`,`col5`)
  ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=75530 ;
  </code></pre>