Osclass Support Forums

Osclass plugin support => Instant Messenger Plugin => Topic started by: MB Themes on September 07, 2018, 12:29:23 PM

Title: Improve performance for Instant Messenger
Post by: MB Themes on September 07, 2018, 12:29:23 PM
As there are more and more threads & messages in Instant Messenger plugin, it might get slow - due to extensive queries.
Add following index on your DB to increase performance of queries (in my case they were 10x faster):

Code: [Select]
CREATE INDEX im_1 ON oc_t_im_threads (i_thread_id,i_from_user_id,i_to_user_id);
CREATE INDEX im_2 ON oc_t_im_messages (fk_i_thread_id,i_read,i_type);

oc_ is database prefix, if you have different, change it ;)