php数据库的最佳选择 [英] best choice of database for php

查看:108
本文介绍了php数据库的最佳选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目是使用某些 Jquery,PHP和Mysql HTTP聊天.

My project is a HTTP chat using some Jquery, PHP and Mysql.

jQuery实际情况每N秒轮询一次数据库,以检查我是否收到了新消息(从mysql表中轮询).

Jquery infact polls the database every N seconds to check if I have receieved new messages (polling form a mysql table).

由于聊天现在具有> 100个连接,因此mysql现在可以在N秒内获得100个请求.

Since chat has now >100 connections, mysql gets now 100 requests within N seconds.

什么是最佳做法,数据库选择对其进行了优化? (必须保持HTTP聊天而不使用某些服务器套接字)

What are the best practices, database choice to optimize it ? (it must remain an HTTP chat without using some server sockets)

致谢

PS.也许MYSQL不是一个好选择

PS. Maybe MYSQL is not the good choice

推荐答案

Id与MySql一起使用,因为它的重量很轻. PHP和MySql相处融洽.由于您将拥有许多更新和对数据库的多次读取,因此InnoDB引擎将为这种情况提供最佳的解决方案.如果选择MyIsam可能会遇到问题,因为它一次只能适合一项工作(更新或阅读).

Id go with MySql since it is very light weight. PHP and MySql get along well. Since you will have many updates and many reads to the database the InnoDB engine will suite this scenario the best. You may run into problems if you choose MyIsam since it is suited for one job at a time (either updating or reading).

这篇关于php数据库的最佳选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆