[Pdns-users] pdns ddns Performance

Thomas Mieslinger tmieslinger at gmx.net
Tue Mar 8 20:40:57 UTC 2016


Hi,

maybe you remember my message regarding suboptimal ddns update 
performance. A colleague helped me to identify the list_subzone_query as 
the performance killer.

The original where clause is

  disabled=0 and (name='%s' OR name like '%s') and domain_id='%d'

with

%.<record-to-update>

as second argument.

When like is used with a search argument that starts with a wildcard the 
index can not be used.

Because I know that my records to update have no subzones I short 
circuit query with

SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records 
WHERE disabled=0 and (name='%s' OR 'x'='%s') and domain_id='%d'

Cheers

Thomas


More information about the Pdns-users mailing list