David it's not the "LIMIT" that causes the performance loss, it's the "ORDER BY postid" command. I had to insert it so that the result returned will be sorted from the recent to the old. However searchindex table has an index on wordid not postid column and it's very large so our SQL command puts a burden on the db. The solution is easy: just create a index on postid column too and you'll be fine..
|