Civcraft / Citadel

Do not open issues here; open them on the maintained fork @ DevotedMC
https://github.com/DevotedMC/Citadel
BSD 3-Clause "New" or "Revised" License
6 stars 23 forks source link

Unnecessary/odd synthetic keys #128

Closed psygate closed 8 years ago

psygate commented 8 years ago

The used database model imposes an unnecessary synthetic key called 'rein_id'. X,Y,Z and World already impose a well defined combined primary key. Given the fact that x,y,z are queried most often, the dm could be reduced to only use x,y,z,world as a primary key. There is no real need to introduce a synthetic key for already well ordered domains. x,y,z,world are all well ordered one dimensional quantities and should be efficiently handled by any modern database.

rourke750 commented 8 years ago

Removing rein_id would break multiblock reinforcements. On Oct 9, 2015 1:46 PM, "Florian" notifications@github.com wrote:

The used database model imposes an unnecessary synthetic key called 'rein_id'. X,Y,Z and World already impose a well defined combined primary key. Given the fact that x,y,z are queried most often, the dm could be reduced to only use x,y,z,world as a primary key. There is no real need to introduce a synthetic key for already well ordered domains. x,y,z,world are all well ordered one dimensional quantities and should be efficiently handled by any modern database.

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/Citadel/issues/128.