Traewelling / traewelling

Free check-in service to log your public transit journeys
https://traewelling.de
GNU Affero General Public License v3.0
231 stars 46 forks source link

[SlowQuery] poly_lines -> source #2588

Closed MrKrisKrisu closed 4 months ago

MrKrisKrisu commented 4 months ago
# Query_time: 0.514819  Lock_time: 0.000010  Rows_sent: 2  Rows_examined: 376241
# Rows_affected: 0  Bytes_sent: 0
# Tmp_tables: 1  Tmp_disk_tables: 0  Tmp_table_sizes: 253976
# Full_scan: Yes  Full_join: No  Tmp_table: Yes  Tmp_table_on_disk: No
# Filesort: Yes  Filesort_on_disk: No  Merge_passes: 0  Priority_queue: No
#
# explain: id   select_type table   type    possible_keys   key key_len ref rows    r_rows  filtered    r_filtered  Extra
# explain: 1    SIMPLE  poly_lines  ALL NULL    NULL    NULL    NULL    420777  376237.00   100.00  100.00  Using temporary; Using filesort
#
SET timestamp=1716386734;
select count(*) AS total, source from `poly_lines` group by `source`;
HerrLevin commented 4 months ago

Same query but with NOLOCK could do the trick?

MrKrisKrisu commented 4 months ago

https://github.com/Traewelling/traewelling/pull/2598