Search code examples
mysqlsqljoomlamysql-slow-query-log

joomla slow query log


I would know what are the queries that make slow my Joomla website. I know that there is the possibility to log all the slow query. Unfortunately, I have only the access to the ftp where the website is hosted. Can I see this log also in ftp? Or I have to access to the server? There are other way to see this log?

Thanks


Solution

  • As Rinos already said, there can be different reasons for a slow Joomla-Site.

    If you cannot find a db-query being responsible for that check the network-tab in your developer-tools for resources that slow down your site.

    One possible reason can be, that you are loading http-resources via https (so if you have hardcoded integrations of images, script-files etc. that will load via http while your site running in https, the developer tools will bark at you something about 'mixed content' ;) )

    Depending on your Joomla there also might be some Modules/Components/Plugins that are not well designed... maybe deactivating them by chance and refreshing (yep, might be lot of work) will give you a hint. BUT: Please be careful, since there are some Plugins like the authentication-plugins that are needed and if you deactivate them you might "lock" yourself out. Normally core components and plugins shouldn't be responsible for that at all.

    If you have a look at the queries from the debug-console, there are some queries that perform a full-table-scan. Maybe you'll find one among these that are performance-hungry.

    If not so, please check your global configuration in the Joomla Backend under System -> Global Configuration and try check the following things:

    • Is caching enabled?
    • What kind of caching do you use?
    • Under the Server-Tab check for gzip-compression of your page
    • if you force https, do you have any http-resources on your site (like mentioned above)

    Some of the possibilities here might help you to gain some performance, but if you still have performance problems, my next look would be the server-config.

    There are still other things you might give a "heads up":

    • What PHP-Version are you running? PHP 7.x brings a remarkable performance-boost
    • Have a look at your php.ini file. What about your memory-limit and other options (have a look here for the technical requirements that are recommended: https://downloads.joomla.org/technical-requirements

    • Back on your site, are there any javascript-errors (the developer-tools of your browser will tell you)

    Well, these are several possibilities you might pay some attention... Performance-Issues can have many reasons but hopefully some of the above said things might lead you on the right track ;)

    regards