Hi all,
Whenever I click save on a device or an extension (even if the extension doesn't have a device associated) FusionPBX generates 6 update queries per device in the system. For small systems this isn't really an issue, but I have close to 2000 devices, so every time I click save, it's generating 12,000 update queries. Additionally, those updates are overwriting the update time, etc. for every single device whenever I click save. I'm on version 5.4.
I deleted every single extension and device out of my system, created two test extensions, and assigned them to two devices. Below is my PSQL log from that test:
Whenever I click save on a device or an extension (even if the extension doesn't have a device associated) FusionPBX generates 6 update queries per device in the system. For small systems this isn't really an issue, but I have close to 2000 devices, so every time I click save, it's generating 12,000 update queries. Additionally, those updates are overwriting the update time, etc. for every single device whenever I click save. I'm on version 5.4.
I deleted every single extension and device out of my system, created two test extensions, and assigned them to two devices. Below is my PSQL log from that test:
Code:
2025-08-08 15:01:25.996 MDT [12955] fusionpbx@fusionpbx LOG: execute <unnamed>: update v_devices set device_provisioned_date = $1, device_provisioned_method = $2, device_provisioned_ip = $3, device_provisioned_agent = $4 where domain_uuid = $5 and device_address = $6
2025-08-08 15:01:25.996 MDT [12955] fusionpbx@fusionpbx DETAIL: parameters: $1 = '2025-08-08 15:01:25.996154-06', $2 = 'https', $3 = '<my local ip>', $4 = '<my browser ua>', $5 = '6481d110-361b-4bf0-8fd1-075cb3fca32d', $6 = '000000000001'
2025-08-08 15:01:26.001 MDT [12955] fusionpbx@fusionpbx LOG: execute <unnamed>: update v_devices set device_provisioned_date = $1, device_provisioned_method = $2, device_provisioned_ip = $3, device_provisioned_agent = $4 where domain_uuid = $5 and device_address = $6
2025-08-08 15:01:26.001 MDT [12955] fusionpbx@fusionpbx DETAIL: parameters: $1 = '2025-08-08 15:01:26.001833-06', $2 = 'https', $3 = '<my local ip>', $4 = '<my browser ua>', $5 = '6481d110-361b-4bf0-8fd1-075cb3fca32d', $6 = '000000000001'
2025-08-08 15:01:26.004 MDT [12955] fusionpbx@fusionpbx LOG: execute <unnamed>: update v_devices set device_provisioned_date = $1, device_provisioned_method = $2, device_provisioned_ip = $3, device_provisioned_agent = $4 where domain_uuid = $5 and device_address = $6
2025-08-08 15:01:26.004 MDT [12955] fusionpbx@fusionpbx DETAIL: parameters: $1 = '2025-08-08 15:01:26.004831-06', $2 = 'https', $3 = '<my local ip>', $4 = '<my browser ua>', $5 = '6481d110-361b-4bf0-8fd1-075cb3fca32d', $6 = '000000000001'
2025-08-08 15:01:26.008 MDT [12955] fusionpbx@fusionpbx LOG: execute <unnamed>: update v_devices set device_provisioned_date = $1, device_provisioned_method = $2, device_provisioned_ip = $3, device_provisioned_agent = $4 where domain_uuid = $5 and device_address = $6
2025-08-08 15:01:26.008 MDT [12955] fusionpbx@fusionpbx DETAIL: parameters: $1 = '2025-08-08 15:01:26.008023-06', $2 = 'https', $3 = '<my local ip>', $4 = '<my browser ua>', $5 = '6481d110-361b-4bf0-8fd1-075cb3fca32d', $6 = '000000000001'
2025-08-08 15:01:26.010 MDT [12955] fusionpbx@fusionpbx LOG: execute <unnamed>: update v_devices set device_provisioned_date = $1, device_provisioned_method = $2, device_provisioned_ip = $3, device_provisioned_agent = $4 where domain_uuid = $5 and device_address = $6
2025-08-08 15:01:26.010 MDT [12955] fusionpbx@fusionpbx DETAIL: parameters: $1 = '2025-08-08 15:01:26.010857-06', $2 = 'https', $3 = '<my local ip>', $4 = '<my browser ua>', $5 = '6481d110-361b-4bf0-8fd1-075cb3fca32d', $6 = '000000000001'
2025-08-08 15:01:26.013 MDT [12955] fusionpbx@fusionpbx LOG: execute <unnamed>: update v_devices set device_provisioned_date = $1, device_provisioned_method = $2, device_provisioned_ip = $3, device_provisioned_agent = $4 where domain_uuid = $5 and device_address = $6
2025-08-08 15:01:26.013 MDT [12955] fusionpbx@fusionpbx DETAIL: parameters: $1 = '2025-08-08 15:01:26.013589-06', $2 = 'https', $3 = '<my local ip>', $4 = '<my browser ua>', $5 = '6481d110-361b-4bf0-8fd1-075cb3fca32d', $6 = '000000000001'
2025-08-08 15:01:26.016 MDT [12955] fusionpbx@fusionpbx LOG: execute <unnamed>: update v_devices set device_provisioned_date = $1, device_provisioned_method = $2, device_provisioned_ip = $3, device_provisioned_agent = $4 where domain_uuid = $5 and device_address = $6
2025-08-08 15:01:26.016 MDT [12955] fusionpbx@fusionpbx DETAIL: parameters: $1 = '2025-08-08 15:01:26.016789-06', $2 = 'https', $3 = '<my local ip>', $4 = '<my browser ua>', $5 = '6481d110-361b-4bf0-8fd1-075cb3fca32d', $6 = '000000000002'
2025-08-08 15:01:26.020 MDT [12955] fusionpbx@fusionpbx LOG: execute <unnamed>: update v_devices set device_provisioned_date = $1, device_provisioned_method = $2, device_provisioned_ip = $3, device_provisioned_agent = $4 where domain_uuid = $5 and device_address = $6
2025-08-08 15:01:26.020 MDT [12955] fusionpbx@fusionpbx DETAIL: parameters: $1 = '2025-08-08 15:01:26.019941-06', $2 = 'https', $3 = '<my local ip>', $4 = '<my browser ua>', $5 = '6481d110-361b-4bf0-8fd1-075cb3fca32d', $6 = '000000000002'
2025-08-08 15:01:26.022 MDT [12955] fusionpbx@fusionpbx LOG: execute <unnamed>: update v_devices set device_provisioned_date = $1, device_provisioned_method = $2, device_provisioned_ip = $3, device_provisioned_agent = $4 where domain_uuid = $5 and device_address = $6
2025-08-08 15:01:26.022 MDT [12955] fusionpbx@fusionpbx DETAIL: parameters: $1 = '2025-08-08 15:01:26.022862-06', $2 = 'https', $3 = '<my local ip>', $4 = '<my browser ua>', $5 = '6481d110-361b-4bf0-8fd1-075cb3fca32d', $6 = '000000000002'
2025-08-08 15:01:26.025 MDT [12955] fusionpbx@fusionpbx LOG: execute <unnamed>: update v_devices set device_provisioned_date = $1, device_provisioned_method = $2, device_provisioned_ip = $3, device_provisioned_agent = $4 where domain_uuid = $5 and device_address = $6
2025-08-08 15:01:26.025 MDT [12955] fusionpbx@fusionpbx DETAIL: parameters: $1 = '2025-08-08 15:01:26.025683-06', $2 = 'https', $3 = '<my local ip>', $4 = '<my browser ua>', $5 = '6481d110-361b-4bf0-8fd1-075cb3fca32d', $6 = '000000000002'
2025-08-08 15:01:26.028 MDT [12955] fusionpbx@fusionpbx LOG: execute <unnamed>: update v_devices set device_provisioned_date = $1, device_provisioned_method = $2, device_provisioned_ip = $3, device_provisioned_agent = $4 where domain_uuid = $5 and device_address = $6
2025-08-08 15:01:26.028 MDT [12955] fusionpbx@fusionpbx DETAIL: parameters: $1 = '2025-08-08 15:01:26.028627-06', $2 = 'https', $3 = '<my local ip>', $4 = '<my browser ua>', $5 = '6481d110-361b-4bf0-8fd1-075cb3fca32d', $6 = '000000000002'
2025-08-08 15:01:26.031 MDT [12955] fusionpbx@fusionpbx LOG: execute <unnamed>: update v_devices set device_provisioned_date = $1, device_provisioned_method = $2, device_provisioned_ip = $3, device_provisioned_agent = $4 where domain_uuid = $5 and device_address = $6
2025-08-08 15:01:26.031 MDT [12955] fusionpbx@fusionpbx DETAIL: parameters: $1 = '2025-08-08 15:01:26.031511-06', $2 = 'https', $3 = '<my local ip>', $4 = '<my browser ua>', $5 = '6481d110-361b-4bf0-8fd1-075cb3fca32d', $6 = '000000000002'