如何实现高流量约会网站的效率和速度 [英] How can I achieve efficiency and speed for high traffic dating web site

查看:92
本文介绍了如何实现高流量约会网站的效率和速度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在建立一个约会网站。


我想知道如何构建数据库和

php文件以便我可以实现速度和效率。


有人可以给我建议并指出我的参考

我可以获得这些信息。

解决方案

PD写道:

我正在建立一个约会网站。

我想要有一些关于如何构建数据库和php文件的信息,以便我可以实现速度和效率。

有人可以给我建议并指出我的参考
我可以在哪里获得这些信息。




我没有任何网站随便 - 但你可以从谷歌数据库开始

搜索


数据库规范化


将帮助你理论化,甚至一些tutori阿尔斯。大多数网站

都是第三种正常形式。


除此之外,它基本上是一种风格问题。实际上没有'正确'

的方式。最重要的是提前设计你的页面(不要编码

他们 - 如果没有别的话,只是在纸上划掉它们)。这将告诉您数据库中需要的
数据。然后找出每件作品所需的代码。


网站的主要功能是易于维护。


-

==================

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================


Jerry Stuckle写道:

PD写道:

我正在建立一个约会网站。

我想要有一些关于如何构建数据库和php文件的信息,以便我可以实现速度和效率。

有人可以给我建议并指出我的参考资料我可以在哪里获得这些信息。




懒惰计算也可以加快速度(例如参见
http://www.wp.dds.nl/article/wrtabrec.htm


最好的问候


" PD" < PD **** @ gmail.com>在新闻中写道:1143063234.055424.271710

@ i40g2000cwc.googlegroups.com:

我目前正在建立一个约会网站。

我想获得一些关于如何构建数据库和php文件的信息,以便我可以实现速度和效率。

有人可以给我建议并指出我的参考资料<我可以在哪里获得这些信息。




尝试研究SQL。通常你可以将大量的重负荷传递给DB

引擎,而不是用PHP做。例如,mySQL 5支持

子选择。在我的脚本中使用子选项已经将我的PHP运行时间提高了300%。另外,尝试使用本机php SQL函数而不是DB.php

类。在我的测试中,当直接mySql

函数时,DB.php类的速度差不多2000%。最后,尝试使用持久连接。也就是说,创建一个DB

对象,在脚本开头打开它,不要关闭它,直到脚本完成




就数据库结构而言,经验法则是,永远不要将数据保存在数据库中多于一个

的位置。

- Bogdan


I am currently making a dating website.

I want to have some information on how to structure the database and
the php files so that I can achieve speed and efficiency.

Can some one please give me suggestions and point me to references
where I can get this information.

解决方案

PD wrote:

I am currently making a dating website.

I want to have some information on how to structure the database and
the php files so that I can achieve speed and efficiency.

Can some one please give me suggestions and point me to references
where I can get this information.



I don''t have any sites offhand - but you can start with the database by a google
search for

database normalization

Will help you with theory of normalization and even some tutorials. Most sites
are around third normal form.

Other than that, it''s basically a matter of style. There''s really no "right"
way to do it. The main thing is to design your pages ahead of time (don''t code
them - just scratch them out on paper if nothing else). This will tell you what
data you need in the database. Then figure out what code you need for each piece.

The main things being the site works and is easy to maintain.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


Jerry Stuckle wrote:

PD wrote:

I am currently making a dating website.

I want to have some information on how to structure the database and
the php files so that I can achieve speed and efficiency.

Can some one please give me suggestions and point me to references
where I can get this information.



Lazy computation can speed up things as well (see for instance
http://www.w-p.dds.nl/article/wrtabrec.htm )

Best regards


"PD" <pd****@gmail.com> wrote in news:1143063234.055424.271710
@i40g2000cwc.googlegroups.com:

I am currently making a dating website.

I want to have some information on how to structure the database and
the php files so that I can achieve speed and efficiency.

Can some one please give me suggestions and point me to references
where I can get this information.



Try to study up on SQL. Usually you can pass a lot of heavy load to the DB
engine, rather then doing it in PHP. For instance mySQL 5 supports
subselects. Just using subselects in my script has improved my PHP run
time by 300%. Also, try to use native php SQL functions instead of DB.php
class. In my tests DB.php class is almost 2000% slower when direct mySql
functions. Finally, try to use persistent connection. That is, create a DB
object, open it in the beginning of the script and don''t close it until
the script has finished.

As far as DB structure, rule of thumb is, never save data in more then one
place in DB.
- Bogdan


这篇关于如何实现高流量约会网站的效率和速度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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