[ejabberd] MySQL schema

Edward Hibbert edward at ehibbert.org.uk
Sun Apr 3 23:16:56 MSK 2016


I'm just getting started with ejabberd, so apologies for any elementary 
mistakes or breach of etiquette.

I've configured ejabberd to store its DB in MySQL.  I saw a problem 
which I think was because of the way the muc_room table is defined.  The 
opts column seems to be used to store the affiliations, in a rather 
inefficient format (but presumably there's a reason for that). However 
it's only defined as a TEXT, which means that if the number of 
affiliations becomes large, then the column will get truncated, and bad 
things will happen.

I've changed it to a LONGTEXT in my schema, but I was wondering:
Am I correct that this schema is wrong?What's the reason for the format 
where the affiliated users are stored in a string-encoded ASCII 
format?Doesn't this use of the opts field to store all affiliations 
(rather than a separate table) mean that the load on the DB isn't 
tenable at scale, when each affiliation change will result in an 
enormous UPDATE call?
As I say, I am new, so may be wildly off-base.

Regards,

Edward
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20160403/5d674e99/attachment.html>


More information about the ejabberd mailing list