Query Metrics
                10
                Database Queries
            
            
                9
                Different statements
            
            
                17.55 ms
                Query time
            
            
                0
                Invalid entities
            
        Queries
| #▲ | Time | Info | 
|---|---|---|
| 1 | 7.68 ms | WITH monthly AS ( SELECT EXTRACT(YEAR FROM data) AS year, EXTRACT(MONTH FROM data) AS month, SUM(rating) AS sum_rating, COUNT(*) AS cnt FROM rating WHERE investment_id = :invId AND data <= :currentDate GROUP BY year, month ) SELECT year, month, ROUND( ( SUM(sum_rating) OVER (ORDER BY year, month) / NULLIF(SUM(cnt) OVER (ORDER BY year, month), 0) )::numeric , 1) AS avg_rating FROM monthly ORDER BY year, month 
                                                Parameters:  [ "invId" => 1 "currentDate" => "2027-09-12" ] | 
| 2 | 1.38 ms | SELECT t0.id AS id_1, t0.smart_contract AS smart_contract_2, t0.name AS name_3, t0.company_name AS company_name_4, t0.location AS location_5, t0.country AS country_6, t0.country_flag AS country_flag_7, t0.description AS description_8, t0.rate AS rate_9, t0.category AS category_10, t0.amount AS amount_11, t0.amount_collected AS amount_collected_12, t0.waiting_people AS waiting_people_13, t0.people AS people_14, t0.economic_rating AS economic_rating_15, t0.legal_rating AS legal_rating_16, t0.community_rating AS community_rating_17, t0.favorite AS favorite_18, t0.start_date AS start_date_19, t0.end_date AS end_date_20 FROM investment t0 WHERE t0.id = ? 
                                                Parameters:  [
  1
] | 
| 3 | 1.47 ms | SELECT n0_.id AS id_0, n0_.title AS title_1, n0_.description AS description_2, n0_.readed AS readed_3, n0_.add_date AS add_date_4, n0_.read_date AS read_date_5, n0_.image AS image_6, n0_.style AS style_7 FROM notification n0_ WHERE n0_.readed = ? ORDER BY n0_.add_date DESC 
                                                Parameters:  [
  0
] | 
| 4 | 0.75 ms | SELECT AVG(r0_.rating) AS sclr_0 FROM rating r0_ WHERE r0_.investment_id = ? AND r0_.data <= ? 
                                                Parameters:  [ 1 "2027-09-12 16:00:00" ] | 
| 5 | 1.22 ms | SELECT EXTRACT(YEAR FROM data) AS year, EXTRACT(MONTH FROM data) AS month, COUNT(*) AS cnt FROM rating WHERE investment_id = :invId AND data <= :currentDate GROUP BY year, month ORDER BY year, month 
                                                Parameters:  [ "invId" => 1 "currentDate" => "2027-09-12" ] | 
| 6 | 0.90 ms | SELECT is_user, COUNT(*) AS cnt FROM rating WHERE investment_id = :invId AND data <= :currentDate GROUP BY is_user 
                                                Parameters:  [ "invId" => 1 "currentDate" => "2027-09-12" ] | 
| 7 | 1.03 ms | SELECT rating AS value, COUNT(*) AS cnt FROM rating WHERE investment_id = :invId AND data <= :currentDate GROUP BY rating ORDER BY rating 
                                                Parameters:  [ "invId" => 1 "currentDate" => "2027-09-12" ] | 
| 8 | 0.56 ms | WITH monthly AS ( SELECT EXTRACT(YEAR FROM data) AS year, EXTRACT(MONTH FROM data) AS month, AVG(rating) AS avg_rating FROM rating WHERE investment_id = :invId AND data <= :currentDate AND is_user = :isUser GROUP BY year, month ) SELECT year, month, ROUND(avg_rating::numeric, 1) AS avg_rating FROM monthly ORDER BY year, month 
                                                Parameters:  [ "invId" => 1 "currentDate" => "2027-09-12" "isUser" => true ] | 
| 9 | 1.21 ms | WITH monthly AS ( SELECT EXTRACT(YEAR FROM data) AS year, EXTRACT(MONTH FROM data) AS month, AVG(rating) AS avg_rating FROM rating WHERE investment_id = :invId AND data <= :currentDate AND is_user = :isUser GROUP BY year, month ) SELECT year, month, ROUND(avg_rating::numeric, 1) AS avg_rating FROM monthly ORDER BY year, month 
                                                Parameters:  [ "invId" => 1 "currentDate" => "2027-09-12" "isUser" => false ] | 
| 10 | 1.35 ms | SELECT EXTRACT(YEAR FROM data)::int AS year, ROUND(AVG(rating)::numeric, 1) AS avg_rating FROM rating WHERE investment_id = :invId AND data <= :currentDate GROUP BY year ORDER BY year 
                                                Parameters:  [ "invId" => 1 "currentDate" => "2027-09-12" ] | 
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.
Entities Mapping
| Class | Mapping errors | 
|---|---|
| App\Entity\Rating | No errors. | 
| App\Entity\Investment | No errors. | 
| App\Entity\WaitingLine | No errors. | 
| App\Entity\Notification | No errors. |