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

Split tables introducing performance bottle necks #129

Closed psygate closed 8 years ago

psygate commented 8 years ago

The tables reinforcement_id and reinforcement are split and should be one table. Or, atleast, use a foreign key constraint. Joining both tables always forces a full scan since there is no reason for the optimizer to assume any shortcuts, which would be possible with foreign keys. Either merge the tables or introduce foreign key constraints.

The current imposed indices do not speed up queries, since there is no relation between the index on reinforcement_id and reinforcement. A foreign key constraint would impose such a relation.