mirror of
https://github.com/jambonz/sbc-inbound.git
synced 2026-11-08 20:43:35 +00:00
Fix/sql query optimize (#233)
* Add STRAIGHT_JOIN to CIDR gateway query to prevent MySQL optimizer from choosing inefficient full table scan on voip_carriers table. * update tests with latest schema * fix test data * security issues * update workflow actions
This commit is contained in:
1 parent
39bd65fb97
commit
678fe9d9a8
5 files changed
+1052
-774
No files matched your search
+1
-1
@@ -42,7 +42,7 @@ AND sg.ipv4 = ?
|
||||
ORDER BY vc.account_sid IS NOT NULL DESC`;
|
||||
|
||||
const sqlSelectCIDRGatewaysForSP =
|
||||
`SELECT sg.sip_gateway_sid, sg.voip_carrier_sid, vc.name, vc.service_provider_sid,
|
||||
`SELECT STRAIGHT_JOIN sg.sip_gateway_sid, sg.voip_carrier_sid, vc.name, vc.service_provider_sid,
|
||||
vc.account_sid, vc.application_sid, sg.inbound, sg.outbound, sg.is_active, sg.ipv4, sg.netmask, sg.pad_crypto,
|
||||
vc.register_username, vc.register_password
|
||||
FROM sip_gateways sg, voip_carriers vc
|
||||
|
||||
Reference in new issue
Block a user