|
Posted by x0054 on 03/23/06 01:58
"PD" <pd1980@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
[Back to original message]
|