[JDEV] xdb_sql suggestions

Matthias Wimmer m at tthias.net
Fri Sep 5 11:13:41 CDT 2003


Hi Raditha!

Raditha Dissanayake schrieb am 2003-09-05 19:20:00:
> I guess Bentoit and Co might have left the tables without indices 
> because there's a large number of inserts being done on these tables.  
> That's because mod_roster passes the entire roster to XDB when a change 
> occurs. xdb_sql deletes the whole lot and inserts them anew.
> I did a patch for this sometime back but never got around to 
> contributing it. With that patch the roster entries just get updated 
> instead of delete/insert.   Let me try to dig it up and send it in.

I don't know if it is faster without an index on small databases, but on
amessage the difference is enormous. Without the index it was not really
usable. It the insert operation would get that expensive with the
indexes, I don't think it would exist on the rosterusers table. It think
the index has just been forgotten.

And on the rosterusers table the index could get smaller and wouldn't
decrease performance if it is limited to maybe the first 32 characters
of username and jid.


Tot kijk
    Matthias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://www.jabber.org/jdev/attachments/20030905/a795eafc/attachment-0002.pgp>


More information about the JDev mailing list