Leucene is likely to be faster for large datasets as it can use the full text index. A select ... like query in a traditional relational database can usually only use an index if the like argument does not start with a wildcard. For instance:
select * from mytable where mycolumn like 'fred%'; -- may use an index on mycolumn select * from mytable where mycolumn like '%fred%'; -- cannot use an index on mycolumn
If you need to make a lot of the second request, it is unlikely to scale well. If you use MySQL with the MyISAM table engine (by default, but do not support foreign keys), you can use the full-text indexing capabilities of MySQL , but the syntax is different and depends on MySQL. It does not use the like keyword.
Asaph source share