Convert `systemtag_object_mapping::object_id` to BIGINT?
Open
Nobody has claimed this yet.
0. Needs triage
feature: database
feature: tags
performance 🚀
technical debt
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
Currently systemtag_object_mapping::object_id is VARCHAR instead of BIGINT. Does this field store something other than file IDs? Due to the difference in type, JOINs against filecache are extremely slow because the whole table needs to be scanned.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with core/Migrations/Version13000Date20170718121200.php around lines 738-743 and trace how systemtag_object_mapping.object_id is populated and joined with filecache. Establish whether the field contains only file IDs, then confirm the schema change preserves existing values and removes the reported slow full-table scan.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- database, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100