Home  >  Article  >  Backend Development  >  有没有先辈弄过秒杀活动的,PHP+MYSQL

有没有先辈弄过秒杀活动的,PHP+MYSQL

WBOY
WBOYOriginal
2016-06-13 13:13:56820browse

有没有前辈弄过秒杀活动的,PHP+MYSQL


我是用行锁来实现的
虽然解决了并发的情况,但是对数据库的负载太大了
想问问有没有前辈做过类似功能的,给点建议。。

另外问几个问题:
1、一般的数据库操作,如果换成事务操作,负载会不会大很多,最好能有一些分析的数据,大概如何
2、“同一时间段”进行很多的行锁操作,对数据库影响严重吗,例如每一个用户对自己的记录进行行锁
谢谢

------解决方案--------------------
抢的时候换nosql试试?然后再数据转到mysql里
------解决方案--------------------
糊弄用户还不简单吗, PHP直接随机数1-60000, 随到1-3的人才查数据库, 其他的都直接说没中.
------解决方案--------------------

探讨
我是用行锁来实现的
Statement:
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