GET http://bandoo-dev.ru/api/conversations?limit=20

Query Metrics

3 Database Queries
3 Different statements
23.70 ms Query time
4 Invalid entities
3 Managed entities

Queries

Group similar statements

# Time Info
1 9.13 ms
SELECT u0_.id AS id_0, u0_.public_number AS public_number_1, u0_.date AS date_2, u0_.email AS email_3, u0_.phone AS phone_4, u0_.phone_numeric AS phone_numeric_5, u0_.privacy_mask AS privacy_mask_6, u0_.push_settings_mask AS push_settings_mask_7, u0_.publish_daily_count AS publish_daily_count_8, u0_.publish_daily_at AS publish_daily_at_9, u0_.settings AS settings_10, u0_.password AS password_11, u0_.about AS about_12, u0_.stuff AS stuff_13, u0_.vk_code_verifier AS vk_code_verifier_14, u0_.vk_id AS vk_id_15, u0_.vk_avatar AS vk_avatar_16, u0_.vk_profile_imported AS vk_profile_imported_17, u0_.vk_confirmed AS vk_confirmed_18, u0_.first_jwt_at AS first_jwt_at_19, u0_.new_email AS new_email_20, u0_.new_email_token AS new_email_token_21, u0_.status AS status_22, u0_.block_reason AS block_reason_23, u0_.role AS role_24, u0_.last_visit_at AS last_visit_at_25, u0_.activity_status AS activity_status_26, u0_.confirm_token_token AS confirm_token_token_27, u0_.confirm_token_expires AS confirm_token_expires_28, u0_.name_first AS name_first_29, u0_.name_last AS name_last_30, u0_.name_middle AS name_middle_31, u0_.avatar_small_hash AS avatar_small_hash_32, u0_.avatar_original_hash AS avatar_original_hash_33, u0_.reset_token_token AS reset_token_token_34, u0_.reset_token_expires AS reset_token_expires_35, u0_.city_id AS city_id_36 FROM "user_users" u0_ WHERE u0_.email = ?
Parameters:
[
  "1a8395f8-35f3-4830-a427-6eae60d2c576@1f226046-3b14-49b3-9753-2b4c6bd31aba.com"
]
2 11.59 ms
SELECT a.id, a.initiator, a.recipient, a.recipient_message_counter, a.initiator_message_counter, a.created_at, a.updated_at, i.name_first as initiator_name, i.name_last as initiator_name_last, i.avatar_small_hash as initiator_avatar_small_hash, r.name_first as recipient_name, r.name_last as recipient_name_last, r.avatar_small_hash as recipient_avatar_small_hash, lm.id as last_message_id, CASE
            WHEN EXISTS (
                SELECT 1 FROM user_message_photos p WHERE p.message_id = lm.id
            ) THEN 'Фото'
            ELSE lm.message
        END as last_message, lm.status_status as last_message_status, lm.timestamp as last_message_timestamp, lm.updated_at as last_message_updated_at, lm.sender as last_message_sender_id, ls.name_first as last_message_sender_name, ls.name_last as last_message_sender_name_last, ls.avatar_small_hash as last_message_sender_avatar_small_hash FROM user_conversations a LEFT JOIN user_users i ON a.initiator = i.id LEFT JOIN user_users r ON a.recipient = r.id LEFT JOIN (    SELECT DISTINCT ON (m.conversation)
        m.conversation,
        m.id,
        m.message,
        m.status_status,
        m.timestamp,
        m.updated_at,
        m.sender
    FROM user_messages m
    ORDER BY m.conversation, m.timestamp DESC NULLS LAST, m.id DESC) lm ON lm.conversation = a.id LEFT JOIN user_users ls ON lm.sender = ls.id WHERE ((a.initiator = ? OR a.recipient = ?)) AND (a.status = ?) AND (EXISTS (SELECT 1 FROM user_messages m WHERE m.conversation = a.id)
                OR a.initiator = ?
                OR a.recipient = ?) ORDER BY a.updated_at DESC, a.id DESC LIMIT 21
Parameters:
[
  "e85281f7-c398-4c03-9540-1019ee040a88"
  "e85281f7-c398-4c03-9540-1019ee040a88"
  "active"
  "019deeab-5934-3cf0-ae98-dc6d872da1b4"
  "019deeab-5934-3cf0-ae98-dc6d872da1b4"
]
3 2.98 ms
SELECT t0.id AS id_1, t0.public_number AS public_number_2, t0.date AS date_3, t0.email AS email_4, t0.phone AS phone_5, t0.phone_numeric AS phone_numeric_6, t0.privacy_mask AS privacy_mask_7, t0.push_settings_mask AS push_settings_mask_8, t0.publish_daily_count AS publish_daily_count_9, t0.publish_daily_at AS publish_daily_at_10, t0.settings AS settings_11, t0.password AS password_12, t0.about AS about_13, t0.stuff AS stuff_14, t0.vk_code_verifier AS vk_code_verifier_15, t0.vk_id AS vk_id_16, t0.vk_avatar AS vk_avatar_17, t0.vk_profile_imported AS vk_profile_imported_18, t0.vk_confirmed AS vk_confirmed_19, t0.first_jwt_at AS first_jwt_at_20, t0.new_email AS new_email_21, t0.new_email_token AS new_email_token_22, t0.status AS status_23, t0.block_reason AS block_reason_24, t0.role AS role_25, t0.last_visit_at AS last_visit_at_26, t0.activity_status AS activity_status_27, t0.confirm_token_token AS confirm_token_token_28, t0.confirm_token_expires AS confirm_token_expires_29, t0.name_first AS name_first_30, t0.name_last AS name_last_31, t0.name_middle AS name_middle_32, t0.avatar_small_hash AS avatar_small_hash_33, t0.avatar_original_hash AS avatar_original_hash_34, t0.reset_token_token AS reset_token_token_35, t0.reset_token_expires AS reset_token_expires_36, t0.city_id AS city_id_37 FROM "user_users" t0 WHERE t0.id = ?
Parameters:
[
  "019efb3d-4132-79dd-abed-2f5eb76ecd0c"
]

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\Model\User\Entity\User 2
App\Model\City\Entity\CityReference 1

Entities Mapping

Class Mapping errors
App\Model\User\Entity\ConfirmToken No errors.
App\Model\User\Entity\Name No errors.
App\Model\User\Entity\Avatar No errors.
App\Model\User\Entity\ResetToken No errors.
App\Model\User\Entity\User
  • The field 'App\Model\User\Entity\User#phoneNumeric' has the property type 'int' that differs from the metadata field type 'string' returned by the 'bigint' DBAL type.
App\Model\City\Entity\CityReference
  • The field 'App\Model\City\Entity\CityReference#foundationYear' has the property type 'int' that differs from the metadata field type 'string' returned by the 'string' DBAL type.
App\Model\User\Entity\Network\Network No errors.
App\Model\User\Entity\Review\Reply No errors.
App\Model\User\Entity\Review\Review No errors.
App\Model\User\Entity\Achievement\Achievement No errors.
App\Model\User\Entity\Photo No errors.
App\Model\User\Entity\Video No errors.
App\Model\User\Entity\Audio
  • The field 'App\Model\User\Entity\Audio#duration' has the property type 'int' that differs from the metadata field type 'string' returned by the 'bigint' DBAL type.
App\Model\User\Entity\Album No errors.
App\Model\User\Entity\Link\Link No errors.
App\Model\User\Entity\Like\Like No errors.
App\Model\User\Entity\Viewed\Viewed No errors.
App\Model\User\Entity\Favorite\Favorite No errors.
App\Model\User\Entity\FavoriteUser\FavoriteUser No errors.
App\Model\User\Entity\Message\MessageStatus No errors.
App\Model\User\Entity\Message\Message No errors.
App\Model\User\Entity\Instrument\UserInstrument No errors.
App\Model\User\Entity\FcmToken\UserFcmToken No errors.
App\Model\User\Entity\Message\Conversation
  • The association App\Model\User\Entity\Message\Conversation#initiator refers to the inverse side field App\Model\User\Entity\User#conversations which does not exist.
  • The association App\Model\User\Entity\Message\Conversation#recipient refers to the inverse side field App\Model\User\Entity\User#conversations which does not exist.