-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
a few optimizations for dashboards #21988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
trasher
merged 18 commits into
glpi-project:11.0/bugfixes
from
orthagh:fix/dashboard_perfs_sql
Nov 26, 2025
+127
−29
Merged
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
fbde469
a few sql optimization for dashboards
orthagh 4d9ac2e
improve reporting of debug card times
orthagh 212c989
extends to all concerned itemtype
orthagh dc384a3
fix
orthagh 4e1fe4e
fix sql
orthagh 886247d
fix sql
orthagh ff3d522
miss a comma
orthagh af8c1e7
cache appliable filters
orthagh 697f76a
is_deleted key is included in active_assets key
orthagh 8039b26
another costy distinct
orthagh b38ee26
another bunch of superflu is_deleted
orthagh b83bbac
add ttl for cache
orthagh cf9d8da
comment
orthagh 151a964
differentiate cache for filter by user id
orthagh 058d908
fix count distinct
orthagh 60f7f39
Apply suggestions from code review
orthagh d2d36bd
Apply suggestions from code review
orthagh a677b6e
bad variable
orthagh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
install/migrations/update_11.0.2_to_11.0.3/index_for_active_assets.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| <?php | ||
|
|
||
| /** | ||
| * --------------------------------------------------------------------- | ||
| * | ||
| * GLPI - Gestionnaire Libre de Parc Informatique | ||
| * | ||
| * http://glpi-project.org | ||
| * | ||
| * @copyright 2015-2025 Teclib' and contributors. | ||
| * @licence https://www.gnu.org/licenses/gpl-3.0.html | ||
| * | ||
| * --------------------------------------------------------------------- | ||
| * | ||
| * LICENSE | ||
| * | ||
| * This file is part of GLPI. | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation, either version 3 of the License, or | ||
| * (at your option) any later version. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU General Public License | ||
| * along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
| * | ||
| * --------------------------------------------------------------------- | ||
| */ | ||
| /** | ||
| * @var Migration $migration | ||
| */ | ||
|
|
||
| $assets_tables_with_templates_and_trashbin = [ | ||
| 'glpi_budgets', | ||
| 'glpi_certificates', | ||
| 'glpi_computers', | ||
| 'glpi_contracts', | ||
| 'glpi_domains', | ||
| 'glpi_cables', | ||
| 'glpi_monitors', | ||
| 'glpi_networkequipments', | ||
| 'glpi_passivedcequipments', | ||
| 'glpi_peripherals', | ||
| 'glpi_phones', | ||
| 'glpi_printers', | ||
| 'glpi_projects', | ||
| 'glpi_projecttasks', | ||
| 'glpi_softwarelicenses', | ||
| 'glpi_softwares', | ||
| 'glpi_racks', | ||
| 'glpi_enclosures', | ||
| 'glpi_pdus', | ||
| 'glpi_assets_assets', | ||
| ]; | ||
|
|
||
| foreach ($assets_tables_with_templates_and_trashbin as $table) { | ||
| $migration->addKey($table, ['is_deleted', 'is_template'], 'active_assets'); | ||
| $migration->dropKey($table, 'is_deleted'); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.