Jump to content

Performance Issues - 504 / slow query on **connections**


Jeff A

Recommended Posts

Admin page is extremely slow and often crashes with 504 - timeout. Have turned on slow-query log. There are quite a few - they all seem to relate to the connections table. This one takes 80 seconds:

# Query_time: 80.357039  Lock_time: 0.000002 Rows_sent: 1  Rows_examined: 8477155
SET timestamp=1754412925;
SELECT COUNT(*) as visits, COUNT(DISTINCT `id_guest`) as unique_visitors
            FROM `connections`
            WHERE `date_add` BETWEEN "2025-01-01 00:00:00" AND "2025-08-02 23:59:59"
             AND id_shop IN (1) LIMIT 1;

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...