Excessive Mysql queries and Mambo

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ergo
    Member
    • Feb 2006
    • 51

    #16
    maybe they should switch off some unnesseary modules from mambo ? hm... i thought mambo was well written...

    http://www.linkedin.com/in/marcinlulek - my linkedIn profile - please check out
    Freelance professional webdeveloper for hire - XHTML, CSS2, PHP 5 , SOON PYTHON, MySQL, PostgreSQL, SQLite, Ajax & Javascript [ using yahooUI and dojotoolkit for ajax work ], database performance optimisation, security audits. - contact me , get work done the way it should be.

    Comment

    • sdjl
      Senior Member
      • Mar 2004
      • 502

      #17
      It doesn't matter how well written a piece of software is, the fact is, if your website gets busy then load starts to increase as more queries for data are being processed.
      The only way to combat this is to incorporate some kind of caching system.

      David
      -----
      Do you fear the obsolescence of the metanarrative apparatus of legitimation?

      Comment

      • ThomasW
        Member
        • Mar 2004
        • 98

        #18
        There is a thread about an account getting locked out on the Joomla forums, looks like it was caused by a query happy 3rd party module.

        Just out of curiosity I did some testing of a few Joomla sites I run and the average number of queries was in the upper 30's to 40's for most pages.
        One site's homepage did generate 111 queries, but when I turned on caching it dropped to 45.

        I usually install modules on a test system just to see how it works and if it slows the webserver down much, it is just a good idea to test a little before putting it to use.
        "The word genius isn't applicable in football. A genius is a guy like Norman Einstein!" ... Joe Theisman

        Comment

        • ergo
          Member
          • Feb 2006
          • 51

          #19
          lol 45 queries this software is crappy then, i have about 15 queries generated on my site and i think its too much, and looking for a way to optimise it....

          http://www.linkedin.com/in/marcinlulek - my linkedIn profile - please check out
          Freelance professional webdeveloper for hire - XHTML, CSS2, PHP 5 , SOON PYTHON, MySQL, PostgreSQL, SQLite, Ajax & Javascript [ using yahooUI and dojotoolkit for ajax work ], database performance optimisation, security audits. - contact me , get work done the way it should be.

          Comment

          • Buddha
            Senior Member
            • Mar 2004
            • 825

            #20
            Just out of curiosity I did some testing of a few Joomla sites I run and the average number of queries was in the upper 30's to 40's for most pages.
            One site's homepage did generate 111 queries, but when I turned on caching it dropped to 45.
            For every MyISAM table there's three files so 3 time 30-111 queries equals a lot of disk activity.

            I usually install modules on a test system just to see how it works and if it slows the webserver down much, it is just a good idea to test a little before putting it to use.
            Excellent advice.
            "Whatcha mean I shouldn't be rude to my clients?! If you want polite then there will be a substantial fee increase." - Buddha

            Comment

            • AndrewT
              Administrator
              • Mar 2004
              • 3657

              #21
              That's exactly the problem with these CMS scripts. 30-40 queries is still a lot for a single page and most of it is not really needed or used by the site running the script. Add a fair amount of visitors to the site and it suddenly becomes a problem.

              Comment

              • ergo
                Member
                • Feb 2006
                • 51

                #22
                heh a simple cms website can use 5 queries of less if its written to do exacly what are client needs mostly... ill be changing my portal's code and my db class will be counting queries, well se what will get :]

                http://www.linkedin.com/in/marcinlulek - my linkedIn profile - please check out
                Freelance professional webdeveloper for hire - XHTML, CSS2, PHP 5 , SOON PYTHON, MySQL, PostgreSQL, SQLite, Ajax & Javascript [ using yahooUI and dojotoolkit for ajax work ], database performance optimisation, security audits. - contact me , get work done the way it should be.

                Comment

                • james
                  Senior Member
                  • Mar 2004
                  • 183

                  #23
                  My advice: you should really use this as an opportunity to charge them more for hosting!

                  A similar thing happened to a site I was hosting, and in the end I charged them more by saying I would move their site to a different server. I now host their site through another web host using a very small shared hosting account there. This way they see you as being pro active in solving their problem, and you also make more money off them.

                  Comment

                  • ergo
                    Member
                    • Feb 2006
                    • 51

                    #24
                    Originally posted by james
                    My advice: you should really use this as an opportunity to charge them more for hosting!

                    A similar thing happened to a site I was hosting, and in the end I charged them more by saying I would move their site to a different server. I now host their site through another web host using a very small shared hosting account there. This way they see you as being pro active in solving their problem, and you also make more money off them.
                    i wuldnt go for this kind of argumentation, i would change my host :] if i'd have to pay more i would like to have better specs for my account

                    http://www.linkedin.com/in/marcinlulek - my linkedIn profile - please check out
                    Freelance professional webdeveloper for hire - XHTML, CSS2, PHP 5 , SOON PYTHON, MySQL, PostgreSQL, SQLite, Ajax & Javascript [ using yahooUI and dojotoolkit for ajax work ], database performance optimisation, security audits. - contact me , get work done the way it should be.

                    Comment

                    • ergo
                      Member
                      • Feb 2006
                      • 51

                      #25
                      Originally posted by Buddha
                      For every MyISAM table there's three files so 3 time 30-111 queries equals a lot of disk activity.
                      im not sure if mysql uses all 3 files for reading. anyway its more important sometimes how a query is written instead of how meny we use.
                      using ORDER BY RAND() , can be a killer to database if there is lots of rows to process. but split into 2 queries can be even 1000x faster for big tables( according to jan kneshkes benchmarks - kneshke works for mysql ).
                      Last edited by ergo; 02-23-2006, 03:13 AM.

                      http://www.linkedin.com/in/marcinlulek - my linkedIn profile - please check out
                      Freelance professional webdeveloper for hire - XHTML, CSS2, PHP 5 , SOON PYTHON, MySQL, PostgreSQL, SQLite, Ajax & Javascript [ using yahooUI and dojotoolkit for ajax work ], database performance optimisation, security audits. - contact me , get work done the way it should be.

                      Comment

                      • Buddha
                        Senior Member
                        • Mar 2004
                        • 825

                        #26
                        Originally posted by ergo
                        im not sure if mysql uses all 3 files for reading.
                        Nope, it probably doesn't and I was pointing out the worst case. On a shared server, disk operations are costly. Chances of hitting any in memory data cache heads to zero as traffic peaks on a shared server and that can bring a site to a grinding halt.
                        Originally posted by ergo
                        anyway its more important sometimes how a query is written instead of how many we use.
                        True.
                        My advice: you should really use this as an opportunity to charge them more for hosting!
                        I like that idea.
                        "Whatcha mean I shouldn't be rude to my clients?! If you want polite then there will be a substantial fee increase." - Buddha

                        Comment

                        • sdjl
                          Senior Member
                          • Mar 2004
                          • 502

                          #27
                          Just a note here, WordPress 2 is also rather query hungry.
                          I've been rather dissapointed with it so far. It uses on average 25 - 35 queries on the main index page and around 20 on single post pages.

                          David
                          -----
                          Do you fear the obsolescence of the metanarrative apparatus of legitimation?

                          Comment

                          • ZYV
                            Senior Member
                            • Sep 2005
                            • 315

                            #28
                            Wpheewww.. I just wanted to recommend WordPress as a blog software of my choice to my sister to host on Dathorn. Would you please recommend a less query-intensive blogging software having all those WordPress's bells and whistles?

                            Comment

                            • ergo
                              Member
                              • Feb 2006
                              • 51

                              #29
                              the best solution is to write a custom one yourself ... really.

                              http://www.linkedin.com/in/marcinlulek - my linkedIn profile - please check out
                              Freelance professional webdeveloper for hire - XHTML, CSS2, PHP 5 , SOON PYTHON, MySQL, PostgreSQL, SQLite, Ajax & Javascript [ using yahooUI and dojotoolkit for ajax work ], database performance optimisation, security audits. - contact me , get work done the way it should be.

                              Comment

                              • ZYV
                                Senior Member
                                • Sep 2005
                                • 315

                                #30
                                Sorry, don't have time for that. I have found an advanced cache for WordPress, which makes it comsume about 15 queries per page the first time, then no queries at all after the page gets cached

                                Comment

                                Working...