Hi,
I'm observing that traccar service takes very long to start.
After some digging i found that the root of the problem is this SQL that is executed on the service initialization:
SELECT * FROM positions WHERE id IN (SELECT positionId FROM devices)
If I change the query by this one that I think that provides the same results:
SELECT * FROM positions inner join devices on positions.id = devices.positionID
The service start almost inmediatly.
My database is MySQL and my positions table has about 5 Millions of records.
¿Do you see any problem with that change?
Thx.
I have seen this problem before. Usually it indicates that you are using very old version of MySQL and you need to upgrade it.
Hi,
My MySQL version is: 5.5.54, the last stable version for Debian.
MySQL 5.5.x has been released in 2010, so almost 7 years ago.
I would recommend installing MySQL 5.7.x.
Hi,
I'm observing that traccar service takes very long to start.
After some digging i found that the root of the problem is this SQL that is executed on the service initialization:
SELECT * FROM positions WHERE id IN (SELECT positionId FROM devices)
If I change the query by this one that I think that provides the same results:
SELECT * FROM positions inner join devices on positions.id = devices.positionID
The service start almost inmediatly.
My database is MySQL and my positions table has about 5 Millions of records.
¿Do you see any problem with that change?
Thx.