0

I have a table with millions of records, for example:

id  Name   Age
1   john    23
2   peter   27
3   moses   23

.... ....

Like this using MySQL MATCH AGAINST query. I want to pick the third row which has name moses & age 23.

I can use an ordinary query like: select from table where name='moses' && age ='23'

But this takes a lot of time. So, my friend told me to use a Match Against Query. Can anyone tell me whether we can do this in a Match Against Query and its advantages?

How can we write the above query using a MATCH() ... AGAINST syntax?

Kate Orlova
  • 3,225
  • 5
  • 11
  • 35
Iam4fun
  • 1,438
  • 3
  • 14
  • 18
  • It is already asked in stackoverflow. Refer these links: http://stackoverflow.com/questions/6304138/mysql-match-against http://stackoverflow.com/questions/5366840/mysql-match-against – Ben Mar 16 '12 at 08:03

1 Answers1

0
SELECT *
FROM table AS t
WHERE MATCH(t.Name) AGAINST('moses')
      AND t.Age=23
Dr.Kameleon
  • 22,532
  • 20
  • 115
  • 223