This is a discussion on speed within the PHP Language forums, part of the PHP Programming Forums category; Hi Gurus I am building my first ever PHP site. Should I worry about speed? These are the parameters of ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi Gurus
I am building my first ever PHP site. Should I worry about speed? These are the parameters of my site - MySQL database with about 500 records (about 50 fields each) and a couple of small related tables - about two or three visitors at the same time - hosted on fast and large server in the US Let me know what else I should consider and how/if I should tweak for speed. TIA - Nicolaas |
|
|||
|
WindAndWaves wrote:
> Hi Gurus > > I am building my first ever PHP site. Should I worry about speed? > > These are the parameters of my site > > - MySQL database with about 500 records (about 50 fields each) and a couple > of small related tables > - about two or three visitors at the same time > - hosted on fast and large server in the US > For something like that speed won't be that big of a concern, anything you do will probably be fast enough. Obviosuly it never hurts to consider speed and always try and make things as fast as you can, but if you find yourself trying to do something that will be fast and cannot manage to get it working, don't hesitate to consider doing it a slower, yet easier way. It would probably take some extreamly bad code to make the site slow enough to notice any problems with a setup like that. |
|
|||
|
"kicken" <slick@aoeex.com> wrote in message news:ieednc2WTqwLtH7cRVn-2g@bresnan.com... > WindAndWaves wrote: > > Hi Gurus > > > > I am building my first ever PHP site. Should I worry about speed? > > > > These are the parameters of my site > > > > - MySQL database with about 500 records (about 50 fields each) and a couple > > of small related tables > > - about two or three visitors at the same time > > - hosted on fast and large server in the US > > > > For something like that speed won't be that big of a concern, anything > you do will probably be fast enough. Obviosuly it never hurts to > consider speed and always try and make things as fast as you can, but if > you find yourself trying to do something that will be fast and cannot > manage to get it working, don't hesitate to consider doing it a slower, > yet easier way. It would probably take some extreamly bad code to make > the site slow enough to notice any problems with a setup like that. Ok, thank you. The reason I asked was that the site I am working with searches text fields rather than ID numbers, but I guess it is nothing really to worry about. |
|
|||
|
WindAndWaves wrote:
> Hi Gurus > > I am building my first ever PHP site. Should I worry about speed? > > These are the parameters of my site > > - MySQL database with about 500 records (about 50 fields each) and a > couple of small related tables > - about two or three visitors at the same time > - hosted on fast and large server in the US > > Let me know what else I should consider and how/if I should tweak for > speed. Hi Nicolaas, You probably don't have to worry. PHP is very fast and your database very small. But of course, it all depends on what you do. If you have 500 records with 50 fields, and you are doing some very complicated itterated math stuff over all the fields, things will be slow. However, if you just search some fields, and make some joins, that will be done very quickly. So it all depends... Very stupid but true advise: Just test it. :-) I also agree with Kicken's response: Try to make your code fast, but if you get stuck: simplify (and slower) your code. Clear, good understandable code is more important than speed in my humble opinion, especially when you are new to PHP/databases. Just make sure that you know what you are doing, maybe after that start worrying about speed. Regards, Erwin Moller > > TIA > > - Nicolaas |
|
|||
|
"Erwin Moller" <since_humans_read_this_I_am_spammed_too_much@spam yourself.com> wrote in message news:41e391c7$0$6218$e4fe514c@news.xs4all.nl... > WindAndWaves wrote: > > > Hi Gurus > > > > I am building my first ever PHP site. Should I worry about speed? > > > > These are the parameters of my site > > > > - MySQL database with about 500 records (about 50 fields each) and a > > couple of small related tables > > - about two or three visitors at the same time > > - hosted on fast and large server in the US > > > > Let me know what else I should consider and how/if I should tweak for > > speed. > > Hi Nicolaas, > > You probably don't have to worry. > PHP is very fast and your database very small. > > But of course, it all depends on what you do. > If you have 500 records with 50 fields, and you are doing some very > complicated itterated math stuff over all the fields, things will be slow. > > However, if you just search some fields, and make some joins, that will be > done very quickly. > > So it all depends... > > Very stupid but true advise: Just test it. :-) > > I also agree with Kicken's response: Try to make your code fast, but if you > get stuck: simplify (and slower) your code. > Clear, good understandable code is more important than speed in my humble > opinion, especially when you are new to PHP/databases. > Just make sure that you know what you are doing, maybe after that start > worrying about speed. > > Regards, > Erwin Moller > Yep, I think you are right... I am just a bit anorexic when it comes to code and the like - so I started to worry about it, now I am just trying to write simple codes - the less lines the better....keeping it simple. Thank you for your info - Nicolaas |