Handling big databases

karolis 8 years ago

I want to ask how people handle big databases and how traccar do. Because if i write a query i need about 30s to get result from positions table. Its pretty much big time for 200k records. Im afraid to think about how long it will take after 1 month then results will be about 500k or even 1kk.

I dont want to delete old records.

Any ideas how to make query time way shorter? Do i need better hardware or do something with database. Currently im using MySQL

Anton Tananaev 8 years ago

You need to write queries that use indexes.

kaykor 8 years ago

You do not say what your hardware is, or any description of what you are actually doing. But here is a use case of about 200,000 rows remote query (local) using MySQL workbench on windows 10 to a virtualbox on same windows 10 Ubuntu 16.04 with 16GB and 4 cores and it takes about 6s.