Skip to content

[main] Fix: use itemtype in values lookups - #1377

Draft
glpi-project[bot] wants to merge 1 commit into
mainfrom
forward-port/1312-to-main
Draft

glpi-project[bot] wants to merge 1 commit into
mainfrom
forward-port/1312-to-main

Conversation

@glpi-project

@glpi-project glpi-project Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Forward-port of #1312 to main.

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.

Description

  • It fixes Value lookups by items_id do not use the itemtype index and scan the whole values table #1310
  • Values lookups on the container tables filter only on items_id (and plugin_fields_containers_id), so they cannot use the itemtype_item_container unique index, which starts with itemtype, and do a full scan of the table. On large tables this slows down the display and the save of every item with additional fields. The lookups and the delete on purge now also filter on itemtype.

@glpi-project

glpi-project Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin forward-port/1312-to-main
git worktree add --checkout .worktree/forward-port/1312-to-main forward-port/1312-to-main
cd .worktree/forward-port/1312-to-main
git reset --hard HEAD^
git cherry-pick -x 449f5762647f31ed79500440f2daf556e7187b92

@glpi-project glpi-project Bot mentioned this pull request Nov 27, 2026
2 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Value lookups by items_id do not use the itemtype index and scan the whole values table

1 participant