Note that there are some explanatory texts on larger screens.

plurals
  1. POMySQL "Sending data" horribly slow
    primarykey
    data
    text
    <p>I have a modest-sized table, 277k records at the moment, which I am trying to do a <code>FULLTEXT</code> search on. The search seems to be very quick until it gets to the Sending data phase.</p> <p><strong>The Table:</strong></p> <pre><code>CREATE TABLE `sqinquiries_inquiry` ( `id` int(11) NOT NULL AUTO_INCREMENT, `ts` datetime NOT NULL, `names` longtext NOT NULL, `emails` longtext NOT NULL, PRIMARY KEY (`id`), FULLTEXT KEY `sqinquiries_inquiry_search` (`names`,`emails`) ) ENGINE=MyISAM AUTO_INCREMENT=305560 DEFAULT CHARSET=latin1 </code></pre> <p><strong>The Query:</strong></p> <pre><code>SELECT * FROM `sqinquiries_inquiry` WHERE ( MATCH (`sqinquiries_inquiry`.`names`) AGAINST ('smith' IN BOOLEAN MODE) OR MATCH (`sqinquiries_inquiry`.`emails`) AGAINST ('smith' IN BOOLEAN MODE) ) ORDER BY `sqinquiries_inquiry`.`id` DESC LIMIT 100 </code></pre> <p><strong>The Profile:</strong> (I snipped out seemingly useless info)</p> <pre><code>+-------------------------+----------+ | Status | Duration | +-------------------------+----------+ | preparing | 0.000014 | | FULLTEXT initialization | 0.000015 | | executing | 0.000004 | | Sorting result | 0.000008 | | Sending data | 2.247934 | | end | 0.000011 | | query end | 0.000003 | +-------------------------+----------+ </code></pre> <p>The <code>DESCRIBE</code> looks great, a simple one liner: <strong>The Describe:</strong></p> <pre><code>id: 1 select_type: SIMPLE table: sqinquiries_inquiry type: index possible_keys: NULL key: PRIMARY key_len: 4 ref: NULL rows: 100 Extra: Using where </code></pre> <p>So what I don't understand is where the 2.25 seconds of Sending data is coming from? I'm seeing similar performance in Python and in the console <code>mysql</code> app, both connecting to <code>localhost</code>.</p> <p><strong>Updates:</strong></p> <ul> <li>Per comment requesting the average row size, it is: 53.8485</li> <li>Per comment, here is the <code>DESCRIBE</code> above.</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload