Too many queries

Discussion in 'PHP' started by Kalyse, Apr 19, 2007.

  1. #1
    Ive been coding a site and anyway, its entirely database dependant, not a single bit of content is display in the HTML.

    EVRYTHING Through the Database. Links content, anything..

    Anyway, there is like 30 queries on average for each page load.

    Do you think this is a stupid amount?
    Will there be performance problems?
     
    Kalyse, Apr 19, 2007 IP
  2. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #2
    depends what sort of queries they are, and how much data each selects, obviously a select * from table will take up more resources than select name1,name2 from table should you not need all the data.

    my website currently queries 22-26 times on a page load - not bothered.......
     
    krakjoe, Apr 19, 2007 IP
  3. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #3
    The less the better.

    Sometimes you can have one query that matches 5 of your queries, make sure you optimize your queries.

    Peace,
     
    Barti1987, Apr 19, 2007 IP
  4. Kalyse

    Kalyse Peon

    Messages:
    1,221
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Well some of the queries I made were before I knew how to do joins, this was like 14 months ago. Im just concerned should I go back over.

    I can maybe cut the number by 5 queries, but it will probably take me 12 hours or so.

    Is it worth it.
     
    Kalyse, Apr 19, 2007 IP
  5. Kalyse

    Kalyse Peon

    Messages:
    1,221
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #5
    The site is the site in my signature. The load time is fine anyway right? I see no problem.
     
    Kalyse, Apr 19, 2007 IP
  6. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #6
    loaded quick enough for me .......
     
    krakjoe, Apr 19, 2007 IP