Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name_player incorrect index #214

Open
erocs opened this issue Aug 17, 2016 · 1 comment
Open

Name_player incorrect index #214

erocs opened this issue Aug 17, 2016 · 1 comment

Comments

@erocs
Copy link

erocs commented Aug 17, 2016

Currently Name_player is created with a unique index on (uuid, player) and no primary key. Instead, it should have a unique index on (uuid) to prevent duplicate UUID mappings, change the existing (uuid, player) index to be non-unique for supporting player lookups by uuids, and add a non-unique (player, uuid) index to facilitate uuid lookups by player name. The latter two are non-unique to speed up operations and because the UUIDs are always unique these entries will always be as well.

A primary key should not be used on this table because that would force record ordering. For random data like uuids, that would cause the table to be rebuilt often to create space for new rows in the ordering.

@erocs erocs added the bug label Aug 17, 2016
@Maxopoly
Copy link

I added one manually after we talked about it, might need to remember that when we automate adding one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants