GET https://bcc-project-tracker.com/reports/budget-items

Query Metrics

363 Database Queries
9 Different statements
101.66 ms Query time
1 Invalid entities
363 Managed entities

Grouped Statements

Show all queries

Time Count Info
83.94 ms
(82.57%)
337
SELECT COALESCE(SUM(e0_.amount), 0) AS sclr_0 FROM expense e0_ WHERE e0_.project_id = ? AND e0_.status = ? AND e0_.expense_date <= ?
Parameters:
[
  132
  "VALIDATED"
  "2025-11-30 00:00:00"
]
6.33 ms
(6.23%)
15
SELECT t0.id AS id_1, t0.code AS code_2, t0.type AS type_3, t0.is_investment_project AS is_investment_project_4, t0.planned_budget AS planned_budget_5, t0.realized_budget AS realized_budget_6, t0.status AS status_7, t0.planned_start_date AS planned_start_date_8, t0.planned_end_date AS planned_end_date_9, t0.actual_start_date AS actual_start_date_10, t0.actual_end_date AS actual_end_date_11, t0.created_at AS created_at_12, t0.market_type AS market_type_13, t0.is_deleted AS is_deleted_14, t0.title AS title_15, t0.phase AS phase_16, t0.description AS description_17, t0.is_sub_project AS is_sub_project_18, t0.currency_id AS currency_id_19, t0.site_id AS site_id_20, t0.objective_id AS objective_id_21, t0.administrative_unit_id AS administrative_unit_id_22, t0.budget_item_id AS budget_item_id_23, t0.main_project_id AS main_project_id_24 FROM project t0 WHERE t0.budget_item_id = ?
Parameters:
[
  17
]
4.19 ms
(4.13%)
1
SELECT a0_.id AS id_0, a0_.label AS label_1, a0_.accronym AS accronym_2, COUNT(DISTINCT b1_.id) AS sclr_3, COUNT(DISTINCT p2_.id) AS sclr_4, COALESCE(SUM(p2_.planned_budget), 0) AS sclr_5, COALESCE(SUM(e3_.amount), 0) AS sclr_6 FROM budget_item b1_ LEFT JOIN project p2_ ON b1_.id = p2_.budget_item_id LEFT JOIN administrative_unit a0_ ON p2_.administrative_unit_id = a0_.id LEFT JOIN expense e3_ ON p2_.id = e3_.project_id WHERE b1_.year = ? AND b1_.is_deleted = ? AND (p2_.is_deleted = ? OR p2_.is_deleted IS NULL) AND (a0_.is_deleted = ? OR a0_.is_deleted IS NULL) GROUP BY a0_.id, a0_.label, a0_.accronym ORDER BY a0_.label ASC
Parameters:
[
  2025
  0
  0
  0
]
2.32 ms
(2.28%)
1
SELECT b0_.id AS id_0, b0_.code AS code_1, b0_.label AS label_2, b0_.amount AS amount_3, b0_.year AS year_4, b0_.description AS description_5, COUNT(p1_.id) AS sclr_6, COALESCE(SUM(p1_.planned_budget), 0) AS sclr_7, COALESCE(SUM(e2_.amount), 0) AS sclr_8 FROM budget_item b0_ LEFT JOIN project p1_ ON b0_.id = p1_.budget_item_id LEFT JOIN expense e2_ ON p1_.id = e2_.project_id WHERE b0_.is_deleted = ? AND b0_.year = ? GROUP BY b0_.id, b0_.code, b0_.label, b0_.amount, b0_.year, b0_.description ORDER BY b0_.label ASC
Parameters:
[
  0
  2025
]
1.78 ms
(1.75%)
1
SELECT b0_.id AS id_0, b0_.code AS code_1, b0_.label AS label_2, b0_.amount AS amount_3, b0_.year AS year_4, b0_.description AS description_5, b0_.created_at AS created_at_6, b0_.updated_at AS updated_at_7, b0_.is_deleted AS is_deleted_8, b0_.currency_id AS currency_id_9 FROM budget_item b0_ LEFT JOIN project p1_ ON b0_.id = p1_.budget_item_id LEFT JOIN administrative_unit a2_ ON p1_.administrative_unit_id = a2_.id WHERE b0_.is_deleted = ? AND b0_.year = ? ORDER BY b0_.label ASC
Parameters:
[
  0
  2025
]
1.05 ms
(1.04%)
5
SELECT t0.id AS id_1, t0.label AS label_2, t0.accronym AS accronym_3, t0.type AS type_4, t0.is_deleted AS is_deleted_5 FROM administrative_unit t0 WHERE t0.id = ?
Parameters:
[
  24
]
0.96 ms
(0.94%)
1
SELECT COALESCE(SUM(e0_.amount), 0) AS sclr_0 FROM expense e0_ LEFT JOIN project p1_ ON e0_.project_id = p1_.id LEFT JOIN budget_item b2_ ON p1_.budget_item_id = b2_.id WHERE e0_.status = ? AND e0_.expense_date <= ? AND b2_.year = ? AND b2_.is_deleted = 0
Parameters:
[
  "VALIDATED"
  "2025-11-30 00:00:00"
  "2025"
]
0.55 ms
(0.54%)
1
SELECT t0.id AS id_1, t0.label AS label_2, t0.accronym AS accronym_3, t0.symbole AS symbole_4, t0.is_deleted AS is_deleted_5, t0.is_default AS is_default_6, t0.is_local AS is_local_7 FROM currency t0 WHERE t0.is_default = ? AND t0.is_deleted = ? LIMIT 1
Parameters:
[
  1
  0
]
0.53 ms
(0.52%)
1
SELECT DISTINCT year FROM budget_item WHERE is_deleted = :isDeleted ORDER BY year DESC
Parameters:
[]

Database Connections

Name Service
default doctrine.dbal.default_connection

Entity Managers

Name Service
default doctrine.orm.default_entity_manager

Second Level Cache

Second Level Cache is not enabled.

Managed Entities

default entity manager

Class Amount of managed objects
App\Entity\Project 337
App\Entity\BudgetItem 15
App\Entity\Objective 5
App\Entity\AdministrativeUnit 5
App\Entity\Currency 1

Entities Mapping

Class Mapping errors
App\Entity\Currency
  • The association App\Entity\Currency#deviseCible refers to the owning side field App\Entity\ConversionDevise#devise_source which does not exist.
App\Entity\ConversionDevise No errors.
App\Entity\BudgetItem No errors.
App\Entity\Project No errors.
App\Entity\AdministrativeUnit No errors.
App\Entity\Site No errors.
App\Entity\Objective No errors.
App\Entity\ProjectSteps No errors.
App\Entity\Expense No errors.