Home » Performance » FullText » Fulltext search with order by static field
Fulltext search with order by static field [message #283] Tue, 24 October 2006 02:32 Go to next message
al.james  is currently offline al.james
Messages: 15
Registered: October 2006
Junior Member
Hi there...

I need to optimise:

SELECT * FROM table WHERE MATCH(text_field) AGAINST ('text') ORDER BY score DESC;

where score is a pre-computed int field.

At the moment, despite text_field and score both having indices, the query results in a filescan.

I guess as mysql will only use one index per table, it is using the fulltext index.

Is there anything that can be done to speed this up?

thanks

Alastair James
Re: Fulltext search with order by static field [message #511 is a reply to message #283 ] Mon, 25 December 2006 20:42 Go to previous messageGo to next message
bluesaga  is currently offline bluesaga
Messages: 15
Registered: December 2006
Junior Member
How many rows are in this query?
How much buffer do you have to utilise?

Not really relevant but worth a say, in my opinion, a much better fulltext alternative is sphinx (www.sphinxsearch.com)

[Updated on: Mon, 25 December 2006 20:43]

Re: Fulltext search with order by static field [message #573 is a reply to message #283 ] Wed, 10 January 2007 11:31 Go to previous messageGo to next message
Peter  is currently offline Peter
Messages: 405
Registered: August 2006
Senior Member
Super Guru
Extra: Using where

Any thoughts?
MySQL FullText search is only use fulltext search index if full text search is performed. This means state=wa will be done using post filtering (by rea


Peter Zaitsev, MySQL Performance Expert
MySQL Performance Blog - http://www.mysqlperformanceblog.com
MySQL Consulting http://www.mysqlperformanceblog.com/mysql-consulting/
Re: Fulltext search with order by static field [message #1649 is a reply to message #283 ] Mon, 20 August 2007 00:10 Go to previous message
albion  is currently offline albion
Messages: 1
Registered: August 2007
Junior Member
in this case can we order table with "ALTER TABLE ORDER BY score DESC" and all next selecting do without ORDER BY statement?
Previous Topic:Setup Sphinx
Next Topic:fulltext search with additional condition in the where clause
Goto Forum:
  



Current Time: Thu Jul 3 19:44:57 EDT 2008

Total time taken to generate the page: 0.02407 seconds
.:: Contact :: Home :: MySQL Support by Percona.com ::.

Powered by: FUDforum 2.7.5.
Copyright ©2001-2006 FUD Forum Bulletin Board Software

MySQL Performance | Forum authority Badge