View Single Post
TheWho
AlliedModders Donor
Join Date: Jul 2012
Old 11-09-2016 , 07:07   Re: Banlist slow loading query on recent MYSQL versions
Reply With Quote #20

Please provide us your "Data dictionary" as .pdf, we can see whether the index is build or not.



If you look below "sb_bans" at "indexes":



The cardinality of keyname `PRIMARY` and `authid` has to be equal otherwise your index is not working.

_________

Now one thing which confuses me and or I don't know corret:
How to use keynames of index:
Quote:
JOIN tbl_name ON tbl_name.key = expr
So you have to make sure that in you query the keynames are correct.

But which name is ment, the tablename or the keyname since you can define the name however you want.




theChaosCoder has one key called `authid_2` which makes..
Quote:
JOIN tbl_name ON tbl_name.authid = expr
useless and it will use the non indexed column.

But what if
Code:
KEY `authid` (`authid_2`)
is known as "#define authid authid_2" and the query will know what to use, maybe even both are working, then my explanation above is bs..
I can't find any documention about this..

Does this even work:
Quote:
JOIN tbl_name ON tbl_name.authid_2 = expr
It's just my mind .. I interrogate so much.
TheWho is offline