在您的网站中显示最新用户活动的最有效方式? PHP/MySQL
我想创建一个新表(logs_table)并跟踪那里的活动。所以我必须运行的唯一查询是这样的:
SELECT * FROM logs_table
而且我会没事的。有没有更有效的方法来做到这一点?
提前致谢 :)
I'd think to make a new table (logs_table) and track the activity there. So the only query I'd have to run is something like:
SELECT * FROM logs_table
and I'll be ok. Is there a more efficient way of doing this?
Thanks in advance :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
并非如此,最好的办法是将数据保存在数据库中,但是在删除记录之前我会小心记录的结构和期限,这样就不会导致数据库过载并降低站点速度。
Not really, best shot is to save data in DB, however I'd be careful with the structure and the age of records before you delete them, so you don't overload the DB and slow down the site.