请问赞功能有什么合适的方法

WBOY
Release: 2016-06-06 20:44:06
Original
932 people have browsed it

比方说一个表userid,topicid,act,这样的设计我知道,但假若一个主题赞数有几百上千那数据量还不会太大了,一般大站是怎么样来设计赞的。mysql可以吗

回复内容:

比方说一个表userid,topicid,act,这样的设计我知道,但假若一个主题赞数有几百上千那数据量还不会太大了,一般大站是怎么样来设计赞的。mysql可以吗

我们 Segmentfault 是这样处理的:

  1. 数据库里放主题的主题信息,包括被赞总数。
  2. redis 放被赞相关的数据,譬如谁赞了哪个主题。
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!