[Pdns-users] [pdns-mysql] a domain_id of type varchar
brightsoul at tiscali.it
Wed Oct 3 08:38:14 UTC 2012
>> an SQL function which hashes your domain name column into a number
Thanks JP, MySql has a
CRC32 function which does exactly what you suggested.
Resorting to that hash function will have a couple side effects, though: one
is the remote possibility of duplicate results and the other one is that all
SELECT queries on the 'records' table will be slower since MySql won't be
able to use the index that I added to the 'domain_id' column.
i.e. the WHERE clause will read ...AND CRC32(domain_id)=%d
Mysql http://dev.mysql.com/doc/refman/5.5/en/view-restrictions.html doesn't
support indexed views either, and that's unfortunate.
All in all, I have to decide if I want to keep the schema I made (knowing
that I might encounter performance issues) or revert to the default schema.
Before deciding, I'll measure how slower it got. PowerDNS/Mysql query
caching migth mitigate this problem yielding acceptable performance.
View this message in context: http://old.nabble.com/-pdns-mysql--a-domain_id-of-type-varchar-tp34505254p34508136.html
Sent from the PowerDNS mailing list archive at Nabble.com.
More information about the Pdns-users