View Issue Details

IDProjectCategoryView StatusLast Update
0001745Anope Stable (2.0.x series)Generalpublic2021-06-30 18:12
Reporterivp Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status newResolutionopen 
PlatformLinux 
Summary0001745: Very slow response to commands due to large number of SQL update statements
DescriptionWhen using db_sql_live module, a large number of SQL update statements are executed every couple of seconds, causing very slow response to commands (3-4 seconds).

Since RunQueryResult is not multi-threaded, all Anope operations are waiting until thousands of queries finish, and then it needs to resync them again and again. Don't see any other explanation for updating timestamps in anope_db_XLine and anope_db_Memo tables every couple of seconds.

This queries should be grouped into single query, i.e.:

UPDATE `anope_db_XLine` SET `timestamp` = FROM_UNIXTIME(1625064951) WHERE `id` = 2003
UPDATE `anope_db_XLine` SET `timestamp` = FROM_UNIXTIME(1625064951) WHERE `id` = 2005
UPDATE `anope_db_XLine` SET `timestamp` = FROM_UNIXTIME(1625064951) WHERE `id` = 2007
UPDATE `anope_db_XLine` SET `timestamp` = FROM_UNIXTIME(1625064951) WHERE `id` = 2009

should be changed to:

UPDATE `anope_db_XLine` SET `timestamp` = FROM_UNIXTIME(1625064951) WHERE `id` IN (2003, 2005, 2007, 2009)

Excerpt from the log attached shows 7500 update queries in 20 seconds.
Tagsdb_sql_live

Activities

ivp

2021-06-30 18:12

reporter  

queries.zip (28,023 bytes)

Issue History

Date Modified Username Field Change
2021-06-30 18:12 ivp New Issue
2021-06-30 18:12 ivp Tag Attached: db_sql_live
2021-06-30 18:12 ivp File Added: queries.zip