Avatar

Profile My Little Forum - some suggestions (General)

by Auge ⌂, Wednesday, March 22, 2017, 09:17 (2586 days ago) @ danielb987
edited by Auge, Friday, March 31, 2017, 14:34

Hello

ALTER TABLE `mlf2_userdata` ADD INDEX(`user_type`);
ALTER TABLE `mlf2_userdata` ADD INDEX(`user_name`);


Should I test this?

It would be nice to test this.

Which operations on the forum, like viewing a thread or going to the main page, would use these indexes?

As I wrote:

A further field, which is often used in WHERE-clauses is the field user_type from the table mlf_userdata. Maybe the column user_name could be indexed too (user lists, search in user area …).

- The check for access to restricted categories depends on the user type.
- The user list can be ordered by the user type and by the user name.
- The search for a user name depends (how surprisingly ;-)) on the user name.

With exception of the first example these are more or less rare cases. But these colums are unique (user_name) respectively a quasi index (user_type) that is used here and there in WHERE-clauses or JOINs.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!


Complete thread:

 RSS Feed of thread