开发者

Do I need to normalize this MySQL db?

I have a classifieds website which uses SOLR to search for whatever ads the user wants to search for... SOLR then retu开发者_开发技巧rns the ID:s of all the matches found. I then use the ID:s to fetch and display the ads from a MySQL table.

currently I have one huge table containing everything in MySQL. Sometimes some of the fields are empty because for instance an apartment has no "model" but a car does.

Is this a problem for me if I use SOLR like I do?

Thanks


Ask yourself these questions:

  • Is your current implementation slow or prone to error?

  • Are you adding a lot of "hacks" in order to display content or fetch data correctly due to the de-normalization of your database?

  • In the long run, will you benefit from normalizing the table?

Hope that helps. It all depends on your situation! Personally, I build databases normalized and then de-normalize as needed to keep things speedy.


If you are using SOLR, why don't you just serve complete ad from solr instead of MySQL to save DB time?

One huge table usually is not goog option at all.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜