SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    imagine no limitations exbabylon's Avatar
    Join Date
    Dec 2000
    Location
    Idaho, USA
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how many queries can be accessing a MySQL DB at one time without considerable slowness... and how many lines do you recomend as MAX for a PHP? I'm at one that's got about 1700 lines... it's got like only four different main IF functions though... SIGNUP FORGOT ADD EDIT DELETE PROFILE

    Is this acceptable?

    thanx..
    Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.

    Exbabylon- Professional Internet Services

  2. #2
    SitePoint Evangelist
    Join Date
    May 2000
    Location
    Canada
    Posts
    533
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    move signup and profile to different pages...

    as for # of queries, i like to stay at 2 / page ... vB (1.1.5 , not talking about 2.0) uses quite a few queries on some pages.. it doesnt "slow things down" , but when your site gets really busy, you dont want to see "no more connections left" errors because your script is running way too many queries and is taking a few miliseconds longer which could be well spent elsewhere
    cogito, ergo sum

  3. #3
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think exbabylon was talking about the way MySQL reacts to a high number of concurent users - if this is the case, then you'll want to read this article:

    PHPBuilder.com: MySQL and PostgreSQL Compared

    That said, It'll be pretty tough to get your site popular enough to bring MySQL to it's knees.

    Oh, and I agree with Vinay: I'd break that file up. Obviously it's nice to have a small number of files to manage, but this convienence is not worth the problematic complexities that usually come with it - just one out-of-place bracket, and you might have to re-write some code.

    Hope that helps.

  4. #4
    imagine no limitations exbabylon's Avatar
    Join Date
    Dec 2000
    Location
    Idaho, USA
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah... so I don't have to worry about it for a little while... thanx....
    Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.

    Exbabylon- Professional Internet Services

  5. #5
    SitePoint Enthusiast
    Join Date
    Dec 2000
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    when i was making a script i had to choose one of these

    Make the database 50% bigger (could grow pver 400mb + 50%)
    Or have like 50 select querys to call one page to get all the info, which would be upto date as well

    49 of them querys would be calling smaller files afew hundred KB each, 1MB max


    which would you go for ?

  6. #6
    imagine no limitations exbabylon's Avatar
    Join Date
    Dec 2000
    Location
    Idaho, USA
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    there's no way to get that data out with just a little more thinking... I've learned that there is almost always a more compact, faster way to grab the results..... You could make it get * and then work with the data using arrays....
    Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.

    Exbabylon- Professional Internet Services


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •