Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The problem with the '%keyword%' type search is that there is no way to efficiently search on it in a regular table, even if you create an index on that column. Think about how you would look that string up in the phone book. There is actually no way to optimize it - you have to scan the entire phone book - and that is what MySQL does, a full table scan.</p> <p>If you change that search to 'keyword%' and use an index, you can get very fast searching. It sounds like this is not what you want, though.</p> <p>So with that in mind, I have used fulltext indexing/searching quite a bit, and here are a few pros and cons:</p> <p><strong>Pros</strong></p> <ul> <li>Very fast</li> <li>Returns results sorted by relevance (by default, although you can use any sorting)</li> <li>Stop words can be used.</li> </ul> <p><strong>Cons</strong></p> <ul> <li>Only works with MyISAM tables</li> <li>Words that are too short are ignored (default minimum is 4 letters)</li> <li>Requires different SQL in where clause, so you will need to modify existing queries.</li> <li>Does not match partial strings (for example, 'word' does not match 'keyword', only 'word')</li> </ul> <p><a href="http://dev.mysql.com/doc/refman/5.0/en/fulltext-natural-language.html" rel="noreferrer">Here is some good documentation on full-text searching</a>.</p> <p>Another option is to use a searching system such as <a href="http://www.sphinxsearch.com/" rel="noreferrer">Sphinx</a>. It can be extremely fast and flexible. It is optimized for searching and integrates well with MySQL.</p>
    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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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