View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002084 | mantisbt | sql | public | 2002-06-03 06:48 | 2024-10-03 08:03 |
| Reporter | Assigned To | dregad | |||
| Priority | normal | Severity | feature | Reproducibility | N/A |
| Status | closed | Resolution | no change required | ||
| Summary | 0002084: Use bug id column to refer to bug_text record | ||||
| Description | In the mantis_bug_table, is the "id" field always the same as the "bug_text_id" field ? If it is, a small optimization could be done in bug_delete.php : Please correct me if I'm wrong ! | ||||
| Tags | No tags attached. | ||||
|
yeah, this seems like a one-to-one relationship to me... I assume it was put in a separate table so that SELECT * on the bug_table would be faster. Not sure how often we need enough information to make listing the fields individually a pain, but don't need the text fields. I don't know the history on this one so I don't know if it's still an issue or if we could move it into the same table. Anyone else know? Ken? Not sure the optimization suggested in the bug will make much difference in speed and without a formal FOREIGN KEY specification, it seems a little "wrong" edited on: 08-21 17:54 |
|
|
It is not always the same, but should be a one-to-one relationship. We could look into changing the database structure to reflect this. |
|
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|
|
Pull Request to fix this issue is in github |
|
|
As mentioned in 0002084:0006817, there is indeed a 1:1 relationship between mantis_bug_table and mantis_bug_text_table. In theory, id and bug_text_id should be equal, but in practice they may differ. For example in this tracker, as of this writing we see
I see no value in changing the database structure, for an "optimization" that would not bring any noticeable improvement, especially considering that, since commit MantisBT master aa5f56b3, bug_delete() function only works based on bug_id, and bug_text_id is retrieved from the bug table. Resolving as no change required. |
|