Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 369651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T13:56:25+00:00 2026-05-12T13:56:25+00:00

I have a modest-sized table, 277k records at the moment, which I am trying

  • 0

I have a modest-sized table, 277k records at the moment, which I am trying to do a FULLTEXT search on. The search seems to be very quick until it gets to the Sending data phase.

The Table:

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

The Query:

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

The Profile: (I snipped out seemingly useless info)

+-------------------------+----------+
| 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 | 
+-------------------------+----------+

The DESCRIBE looks great, a simple one liner:
The Describe:

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

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 mysql app, both connecting to localhost.

Updates:

  • Per comment requesting the average row size, it is: 53.8485
  • Per comment, here is the DESCRIBE above.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T13:56:26+00:00Added an answer on May 12, 2026 at 1:56 pm

    The DESCRIBE looks great, a simple one liner.

    Since you are using only one table in your query it cannot be anything other than a one-liner.

    However, your query does not use the FULLTEXT index.

    For the index to be usable, you should rewrite the query a little:

    SELECT  *
    FROM    sqinquiries_inquiry
    WHERE   MATCH (names, emails) AGAINST ('smith' IN BOOLEAN MODE)
    ORDER BY
            id DESC
    LIMIT 100
    

    MATCH only uses the index if the you match against the exact set of columns the index is defined on.

    So your query uses the index scan on id: Using index; Using where at the very end of your DESCRIBE.

    Sending data is quite misleading: this is actually time elapsed between the end of the previous operation and the end of the current operation.

    For instance, I just ran this query:

    SET profiling = 1;
    
    SELECT  *
    FROM    t_source
    WHERE   id + 1 = 999999;
    
    SHOW PROFILE FOR QUERY 39;
    

    which returned a single row and this profile:

    'starting', 0.000106
    'Opening tables', 0.000017
    'System lock', 0.000005
    'Table lock', 0.000014
    'init', 0.000033
    'optimizing', 0.000009
    'statistics', 0.000013
    'preparing', 0.000010
    'executing', 0.000003
    'Sending data', 0.126565
    'end', 0.000007
    'query end', 0.000004
    'freeing items', 0.000053
    'logging slow query', 0.000002
    'cleaning up', 0.000005
    

    Since the index is not usable, MySQL needs to perform the full table scan.

    0.126565 seconds are the time from the beginning of the execution (the time the first row was read) and the end on the execution (the time the last row was sent to the client).

    This last row is at the very end of the table and it took a long time to find and send it.

    P. S. Edited to remove the downvote 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table that is quite modest in size at the moment but
I have a table, with rows which all have a cell of a div
What I am trying to achieve is to have two control modes, a free
I have a page that displays a table in two different modes. In each
i have task which takes a parameter and has three modes of results Example
I have a python (pygtk) application which starts in different modes depending on arguments.
have written this little class, which generates a UUID every time an object of
Have a procedure which looks like Procedure TestProc(TVar1, TVar2 : variant); Begin TVar1 :=
Have deployed numerous report parts which reference the same view however one of them
i have a very simple server running WAMP on a windows machine, with a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.