Omiga
Omiga

Reputation: 581

Solr for indexing one table VS regular MySQL innoDB table buffer

I'm planning to use Solr for search over one mysql table, this table should have a millions of records. i Did normalised this table so it can be indexed and searched by solr for more performance results.

Is this right or it should be searching with mysql table it self, i mean normal select.

please advice which is better since it's just one table to be indexed and searched.

Thanks

Upvotes: 0

Views: 709

Answers (2)

Night Warrier
Night Warrier

Reputation: 381

Try using 3rd party search service like www.rockitsearch.com . It is an out of the box search solution. No need to worry about maintenance of solr cluster.

Upvotes: 0

spencer7593
spencer7593

Reputation: 108370

If your requirement is to "search" only one MySQL table using regular SQL SELECT statements, then Apache Solr seems a bit roundabout and overkill.

With solr, you'd need to periodically import data from the MySQL table into the solr schema, which essentially means you'll be maintaining two copies of the data. So there's also a delay between the time data is changed in the MySQL table and when the solr schema is refreshed from the database.

Aside from that, as far as performance, I'd expect that solr would be nearly as fast searching its schema as MySQL would be at searching it's own table. But you'd really need to test that, to make that determination for your particular requirements.


You'd likely want to make use of the solr "delta import", specifying appropriate queries to identify rows in the MySQL table that have been inserted and updated since the last import.

If this is the only usage of the MySQL table, then the only indexes you would really need on the MySQL table, as far as solr search/import performance is concerned, would be those indexes needed to optimize the performance of the two "delta import" queries.

Upvotes: 1

Related Questions