473,804 Members | 3,802 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I achieve efficiency and speed for high traffic dating web site

PD
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.

Mar 22 '06 #1
12 2318
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*******@attgl obal.net
=============== ===
Mar 22 '06 #2
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
Mar 22 '06 #3
"PD" <pd****@gmail.c om> wrote in news:1143063234 .055424.271710
@i40g2000cwc.go oglegroups.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
Mar 23 '06 #4
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

x0054 wrote:
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.


Well, technically, a persistent connection is never closed - the PHP engine
keeps it open, so the next script to "open" a persistent connection does
not open it - it reuses the connection from a previously run script.

See php.net/mysql_pconnect ...

- --
- ----------------------------------
Iván Sánchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

Cabeza: El aparato con que pensamos qué pensamos.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEIe1O3jc Q2mg3Pc8RAl3tAJ 4m1A4zviByJFgYZ t/vRgj1E5jzHgCfSy pD
Gd9oZS+L7Ct7dLh kxadg0o8=
=naUp
-----END PGP SIGNATURE-----
Mar 23 '06 #5
PD
Jerry, Dikkie, Bogdan,

Thanks for the input.
More is welcome.

- PD

Mar 23 '06 #6
PD
Thanks for the input Bogdan.

I use MySQL 4 so subselect is out.

Also I had a confusion. I dont understand how a persistant connection
can help boost the speed. I thought it the other way. So I open and
close a connection at every query. A persistant connection can run the
db into a lot of open connections, wont it? Please throw some light on
this one.

Thanks again!

Mar 23 '06 #7
PD
Thanks Iván.

Mar 23 '06 #8
Rather than have a lot of lengthy SQL queries, we have always opted to do a
good portion of the data processing/filtering for high-traffic sites in PHP,
and when necessary have optimized the application server for speed. You
should check out the Zend Optimizer and/or Zend Caneveral. These
optimizations will cache php scripts in the server's memory (along with
common database queries) to improve speed and reduce load on the db &
interpretive engines. Then, after all is said and done, you can always use a
stateful load balancer (such as the Cisco local director) to distribute
requests to duplicate servers while maintaining session information for each
user.

In some cases, one may run into a data storage problem before running into a
script/query speed problem, even without application server optimization.
This can be taken care of using a storage area network.

Until then, if you want to squeeze the most out of one box, bear these in
mind:
PHP - Split your files up and only run the code that you need for the action
being carried out
PHP - Limit your use of abstracted methods - make sure they are efficient,
and if not write your own.
PHP - You can often write little scripts to loop over subroutines that
contain code you suspect to be sluggish, and determine exactly what the
overhead is. Some built-in PHP methods are faster than combinations of
others that achieve the same thing, especially in specific contexts and
especially for string parsing tasks.
MySQL - Indexes. Learn & use them. Keep them as small as possible.

Good luck & happy programming,

ECRIA Dev Team
http://www.ecria.com
Mar 23 '06 #9
PD wrote:
Thanks for the input Bogdan.

I use MySQL 4 so subselect is out.

Also I had a confusion. I dont understand how a persistant connection
can help boost the speed. I thought it the other way. So I open and
close a connection at every query. A persistant connection can run the
db into a lot of open connections, wont it? Please throw some light on
this one.

Thanks again!


Yes and no. Persistent connections will stay open - but your script will run
very quickly compared to real-time. You probably won't have very many
connections in use at one time. OTOH, there is a significant amount of overhead
in connecting to MySQL.

Personally, I do it a little differently. I make the connection at the
beginning of the script (or no later than first use). Then I close the
connection before the script exits.

In most cases it works as fast as persistent connection (which have their own
overhead associated with them) but doesn't make multiple connections per script
to the database.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Mar 23 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3323
by: fbionyourtail | last post by:
Been looking for a good PHP based dating script that is reasonably priced for a while. Several come close but are unfinished. I've already been burned by scripts almost done and then a complete breach of contract where the author dumps the site, no word to the purchasers, and then starts selling it elsewhere under a different domain (hello Ronald James aka RJ selling "Matchmaker Pro" -- don't by it -- it's copy protected too -- you'll be...
14
1552
by: Bulba! | last post by:
One of the posters inspired me to do profiling on my newbie script (pasted below). After measurements I have found that the speed of Python, at least in the area where my script works, is surprisingly high. This is the experiment: a script recreates the folder hierarchy somewhere else and stores there the compressed versions of files from source hierarchy (the script is doing additional backups of the disk of file server at the company...
37
4339
by: asj | last post by:
awhile back, eBay decided to switch from a Microsoft/.NET/Windows architecture on the backend to a J2EE one, which might explain why their java backend will handle up to 1 BILLION page views a day! the funny thing was eBay was one of the major case studies for .NET at the beginning, when there was still some hype about it. interesting post about a few java case studies: http://weblogs.java.net/pub/wlg/268 "I love looking through case...
1
3341
by: magia | last post by:
Start or professionally redesign your dating website with MAGIA Dating Site Design (www.qesign.com/psd-dating.shtml). Online dating is an ever expanding industry! *** Very attractive stylish design suits any dating, personals, singles or matchmaking website as well as brides / marrige agency website. *** Choose your favorite color from our default orange or blue color variations. Both variations are "built" into PSD file, moreover you...
9
2066
by: burningsunorama | last post by:
Hi guys! This is maybe a too 'academic problem', but I would like to hear your opinions, something like pros and cons for each approach.... ... Recently we've had at work a little talk about the way of providing const modifier for function parameters. From my point of view are, of course, design requirements always more important and thus one should always use const keyword with parameters whose values shouldn't get changed inside a...
2
2784
by: jphelan | last post by:
Ever since I successfully applied some techniques for increasing the speed of my 17 meg. Application; it has only made me hunger for more. First, let me list what I have done so far: 1. Split the application and database into front and back-ends, 2. Increased the load-time of my application by "pre-loading my heaviest forms when the database is initially opened, 3. When forms do open, under, "Filter Lookup" I use, "Never", 4. I set...
10
3305
by: ircmaxell | last post by:
Ok, I have a program that reads the contents of a file (1 line, 5 '|' seperated items). Every so often (between twice a day, and 200 times a day), it rewrites the contents of that file. I also do a few database update queries whenever the file is written. I only open up the database connector if I need to update the database. The script itself runs every 30 seconds. My question, is that is it faster and more efficient to read the file...
34
4387
by: Victor Kryukov | last post by:
Hello list, our team is going to rewrite our existing web-site, which has a lot of dynamic content and was quickly prototyped some time ago. Today, as we get better idea of what we need, we're going to re-write everything from scratch. Python is an obvious candidate for our team: everybody knows it, everybody likes it, it has *real* objects, nice clean syntax etc.
4
3302
by: Aaron | last post by:
AJ Dating Script is built with focus on increased ease of users and raised profits of webmasters. PHP/My SQL development are the cornerstone of our work. We also provide solutions in various domains like auction, jobs, dating, matrimonial, HYIP, matrix, affiliate system, content management system and more. And desktop software includes system software, game programming and mobile technology. http://www.ajdating.com
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9577
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10315
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10075
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9140
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.