[Pdns-users] specifying more complex sql queries with gmysql back-end

Nils Breunese (Lemonbit) nils at lemonbit.com
Mon Nov 14 22:30:03 UTC 2011

Tom wrote:

> Our setup is a little more complex than the default way of doing things.  We have a table which has what we call 'override records', which take priority over the records that appear in the normal records database.  We also generate SOAs dynamically.  Basically, the query I have does a union with records from both overriderecords and records, unless the dns is suspended, which is another comparison that needs to be done, and it also determines whether the request type is an SOA using a case statement, and then executes a stored procedure to generate the 'content' column data.
> I just want to write this in to the config file rather than calling it as a stored procedure, and I'm hoping then that I can reduce load of the database server by actually having MySQL cache the results of the queries (which it doesn't do at all when you call a stored proc).

Could you catch all that logic in a view maybe? Then you could write a query against that and put that in your config file. Just a thought, I don't know if that could work.



More information about the Pdns-users mailing list