134.17 ms (12.50%)
|
1 |
SELECT (CASE WHEN (SELECT COUNT(i0_.id) AS sclr_1 FROM breeding b1_ LEFT JOIN breeding_images b2_ ON b1_.id = b2_.breeding_id LEFT JOIN image i0_ ON i0_.id = b2_.image_id WHERE b1_.id = b3_.id) > 3 THEN 1 ELSE 0 END) + (CASE WHEN (SELECT COUNT(o4_.id) AS sclr_2 FROM breeding b5_ LEFT JOIN `user` u6_ ON b5_.owner_id = u6_.id LEFT JOIN offer o4_ ON u6_.id = o4_.owner_id WHERE b5_.id = b3_.id AND o4_.status = ?) > 0 THEN 2 ELSE 0 END) AS sclr_0, b3_.id AS id_3, b3_.name AS name_4, b3_.regon AS regon_5, b3_.description AS description_6, b3_.verified AS verified_7, b3_.association_custom AS association_custom_8, b3_.nickname AS nickname_9, b3_.facebook_url AS facebook_url_10, b3_.instagram_url AS instagram_url_11, b3_.web_url AS web_url_12, b3_.certificate_file AS certificate_file_13, b3_.certificate_file_status AS certificate_file_status_14, b3_.certificate_file_uploaded_at AS certificate_file_uploaded_at_15, b3_.certificate_file_rejected_reason AS certificate_file_rejected_reason_16, b3_.certificate_file_public AS certificate_file_public_17, b3_.deleted_at AS deleted_at_18, b7_.id AS id_19, b7_.name AS name_20, b7_.slug AS slug_21, b7_.description AS description_22, b7_.active AS active_23, b7_.breeding_description AS breeding_description_24, b7_.title AS title_25, b7_.meta_title AS meta_title_26, b7_.meta_keywords AS meta_keywords_27, b7_.meta_description AS meta_description_28, b8_.id AS id_29, b8_.name AS name_30, b8_.content AS content_31, b8_.stat_size AS stat_size_32, b8_.stat_exercises AS stat_exercises_33, b8_.stat_training AS stat_training_34, b8_.stat_hair_amount AS stat_hair_amount_35, b8_.stat_haircut_frequency AS stat_haircut_frequency_36, b8_.stat_kids AS stat_kids_37, b8_.stat_health AS stat_health_38, b8_.stat_costs AS stat_costs_39, b8_.stat_intelligence AS stat_intelligence_40, b8_.param_life AS param_life_41, b8_.param_weight_male AS param_weight_male_42, b8_.param_weight_female AS param_weight_female_43, b8_.param_growth AS param_growth_44, b8_.param_recognized_by_fci AS param_recognized_by_fci_45, b8_.blocks AS blocks_46, b8_.title AS title_47, b8_.meta_title AS meta_title_48, b8_.meta_keywords AS meta_keywords_49, b8_.meta_description AS meta_description_50, c9_.id AS id_51, c9_.name AS name_52, c9_.slug AS slug_53, c9_.description AS description_54, c9_.active AS active_55, c9_.position AS position_56, c9_.breeding_description AS breeding_description_57, c9_.title AS title_58, c9_.meta_title AS meta_title_59, c9_.meta_keywords AS meta_keywords_60, c9_.meta_description AS meta_description_61, u10_.id AS id_62, u10_.email AS email_63, u10_.roles AS roles_64, u10_.password AS password_65, u10_.firstname AS firstname_66, u10_.lastname AS lastname_67, u10_.phone AS phone_68, u10_.city AS city_69, u10_.postcode AS postcode_70, u10_.address AS address_71, u10_.active AS active_72, u10_.is_verified AS is_verified_73, u10_.uuid AS uuid_74, u10_.newsletter AS newsletter_75, u10_.is_blocked AS is_blocked_76, u10_.blocked_message AS blocked_message_77, u10_.blocked_date AS blocked_date_78, u10_.allow_auto_approval AS allow_auto_approval_79, u10_.type AS type_80, u10_.last_offer_added_at AS last_offer_added_at_81, u10_.delete_request_at AS delete_request_at_82, u10_.created_at AS created_at_83, u10_.updated_at AS updated_at_84, u10_.deleted_at AS deleted_at_85, f11_.id AS id_86, f11_.name AS name_87, f11_.phone AS phone_88, f11_.regon AS regon_89, f11_.address AS address_90, f11_.city AS city_91, f11_.postcode AS postcode_92, f11_.description AS description_93, f11_.facebook_url AS facebook_url_94, f11_.instagram_url AS instagram_url_95, f11_.web_url AS web_url_96, f11_.deleted_at AS deleted_at_97, i12_.id AS id_98, i12_.name AS name_99, i12_.alt AS alt_100, i12_.file AS file_101, i12_.uuid AS uuid_102, i12_.type AS type_103, i12_.temp AS temp_104, i12_.path AS path_105, i12_.width AS width_106, i12_.height AS height_107, i12_.extension AS extension_108, i12_.position AS position_109, i12_.created_at AS created_at_110, i12_.updated_at AS updated_at_111, a13_.id AS id_112, a13_.name AS name_113, a13_.regon AS regon_114, f14_.id AS id_115, f14_.name AS name_116, f14_.regon AS regon_117, f14_.description AS description_118, f14_.show_badge AS show_badge_119, f14_.full_name AS full_name_120, f14_.show_table AS show_table_121, i15_.id AS id_122, i15_.name AS name_123, i15_.alt AS alt_124, i15_.file AS file_125, i15_.uuid AS uuid_126, i15_.type AS type_127, i15_.temp AS temp_128, i15_.path AS path_129, i15_.width AS width_130, i15_.height AS height_131, i15_.extension AS extension_132, i15_.position AS position_133, i15_.created_at AS created_at_134, i15_.updated_at AS updated_at_135, p16_.id AS id_136, p16_.name AS name_137, p16_.slug AS slug_138, p16_.active AS active_139, b3_.owner_id AS owner_id_140, b3_.association_id AS association_id_141, b7_.image_id AS image_id_142, b7_.category_id AS category_id_143, b8_.breed_id AS breed_id_144, c9_.category_id AS category_id_145, c9_.image_id AS image_id_146, u10_.province_id AS province_id_147, u10_.avatar_id AS avatar_id_148, u10_.last_payment_address_id AS last_payment_address_id_149, f11_.province_id AS province_id_150, f11_.owner_id AS owner_id_151, i12_.owner_id AS owner_id_152, a13_.federation_id AS federation_id_153, i15_.owner_id AS owner_id_154 FROM breeding b3_ LEFT JOIN breeding_breed b17_ ON b3_.id = b17_.breeding_id LEFT JOIN breed b7_ ON b7_.id = b17_.breed_id LEFT JOIN breed_information b8_ ON b7_.id = b8_.breed_id LEFT JOIN category c9_ ON b7_.category_id = c9_.id LEFT JOIN `user` u10_ ON b3_.owner_id = u10_.id LEFT JOIN foundation f11_ ON u10_.id = f11_.owner_id LEFT JOIN breeding_images b18_ ON b3_.id = b18_.breeding_id LEFT JOIN image i12_ ON i12_.id = b18_.image_id LEFT JOIN association a13_ ON b3_.association_id = a13_.id LEFT JOIN federation f14_ ON a13_.federation_id = f14_.id LEFT JOIN image i15_ ON u10_.avatar_id = i15_.id LEFT JOIN province p16_ ON u10_.province_id = p16_.id LEFT JOIN offer o19_ ON u10_.id = o19_.owner_id WHERE u10_.is_blocked <> 1 AND u10_.is_verified = 1 AND u10_.active = 1 AND u10_.deleted_at IS NULL AND b3_.id IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ORDER BY sclr_0 DESC, u10_.last_offer_added_at DESC, b3_.id DESC, b7_.name ASC, i12_.position ASC
Parameters: [
"approved"
1479
152
3259
992
1237
3250
3239
3248
3247
1148
1946
3062
2976
1850
2887
3087
]
SELECT
(
CASE WHEN (
SELECT
COUNT(i0_.id) AS sclr_1
FROM
breeding b1_
LEFT JOIN breeding_images b2_ ON b1_.id = b2_.breeding_id
LEFT JOIN image i0_ ON i0_.id = b2_.image_id
WHERE
b1_.id = b3_.id
) > 3 THEN
1
ELSE
0
END
) + (
CASE WHEN (
SELECT
COUNT(o4_.id) AS sclr_2
FROM
breeding b5_
LEFT JOIN `user` u6_ ON b5_.owner_id = u6_.id
LEFT JOIN offer o4_ ON u6_.id = o4_.owner_id
WHERE
b5_.id = b3_.id
AND o4_.status = ?
) > 0 THEN
2
ELSE
0
END
) AS sclr_0,
b3_.id AS id_3,
b3_.name AS name_4,
b3_.regon AS regon_5,
b3_.description AS description_6,
b3_.verified AS verified_7,
b3_.association_custom AS association_custom_8,
b3_.nickname AS nickname_9,
b3_.facebook_url AS facebook_url_10,
b3_.instagram_url AS instagram_url_11,
b3_.web_url AS web_url_12,
b3_.certificate_file AS certificate_file_13,
b3_.certificate_file_status AS certificate_file_status_14,
b3_.certificate_file_uploaded_at AS certificate_file_uploaded_at_15,
b3_.certificate_file_rejected_reason AS certificate_file_rejected_reason_16,
b3_.certificate_file_public AS certificate_file_public_17,
b3_.deleted_at AS deleted_at_18,
b7_.id AS id_19,
b7_.name AS name_20,
b7_.slug AS slug_21,
b7_.description AS description_22,
b7_.active AS active_23,
b7_.breeding_description AS breeding_description_24,
b7_.title AS title_25,
b7_.meta_title AS meta_title_26,
b7_.meta_keywords AS meta_keywords_27,
b7_.meta_description AS meta_description_28,
b8_.id AS id_29,
b8_.name AS name_30,
b8_.content AS content_31,
b8_.stat_size AS stat_size_32,
b8_.stat_exercises AS stat_exercises_33,
b8_.stat_training AS stat_training_34,
b8_.stat_hair_amount AS stat_hair_amount_35,
b8_.stat_haircut_frequency AS stat_haircut_frequency_36,
b8_.stat_kids AS stat_kids_37,
b8_.stat_health AS stat_health_38,
b8_.stat_costs AS stat_costs_39,
b8_.stat_intelligence AS stat_intelligence_40,
b8_.param_life AS param_life_41,
b8_.param_weight_male AS param_weight_male_42,
b8_.param_weight_female AS param_weight_female_43,
b8_.param_growth AS param_growth_44,
b8_.param_recognized_by_fci AS param_recognized_by_fci_45,
b8_.blocks AS blocks_46,
b8_.title AS title_47,
b8_.meta_title AS meta_title_48,
b8_.meta_keywords AS meta_keywords_49,
b8_.meta_description AS meta_description_50,
c9_.id AS id_51,
c9_.name AS name_52,
c9_.slug AS slug_53,
c9_.description AS description_54,
c9_.active AS active_55,
c9_.position AS position_56,
c9_.breeding_description AS breeding_description_57,
c9_.title AS title_58,
c9_.meta_title AS meta_title_59,
c9_.meta_keywords AS meta_keywords_60,
c9_.meta_description AS meta_description_61,
u10_.id AS id_62,
u10_.email AS email_63,
u10_.roles AS roles_64,
u10_.password AS password_65,
u10_.firstname AS firstname_66,
u10_.lastname AS lastname_67,
u10_.phone AS phone_68,
u10_.city AS city_69,
u10_.postcode AS postcode_70,
u10_.address AS address_71,
u10_.active AS active_72,
u10_.is_verified AS is_verified_73,
u10_.uuid AS uuid_74,
u10_.newsletter AS newsletter_75,
u10_.is_blocked AS is_blocked_76,
u10_.blocked_message AS blocked_message_77,
u10_.blocked_date AS blocked_date_78,
u10_.allow_auto_approval AS allow_auto_approval_79,
u10_.type AS type_80,
u10_.last_offer_added_at AS last_offer_added_at_81,
u10_.delete_request_at AS delete_request_at_82,
u10_.created_at AS created_at_83,
u10_.updated_at AS updated_at_84,
u10_.deleted_at AS deleted_at_85,
f11_.id AS id_86,
f11_.name AS name_87,
f11_.phone AS phone_88,
f11_.regon AS regon_89,
f11_.address AS address_90,
f11_.city AS city_91,
f11_.postcode AS postcode_92,
f11_.description AS description_93,
f11_.facebook_url AS facebook_url_94,
f11_.instagram_url AS instagram_url_95,
f11_.web_url AS web_url_96,
f11_.deleted_at AS deleted_at_97,
i12_.id AS id_98,
i12_.name AS name_99,
i12_.alt AS alt_100,
i12_.file AS file_101,
i12_.uuid AS uuid_102,
i12_.type AS type_103,
i12_.temp AS temp_104,
i12_.path AS path_105,
i12_.width AS width_106,
i12_.height AS height_107,
i12_.extension AS extension_108,
i12_.position AS position_109,
i12_.created_at AS created_at_110,
i12_.updated_at AS updated_at_111,
a13_.id AS id_112,
a13_.name AS name_113,
a13_.regon AS regon_114,
f14_.id AS id_115,
f14_.name AS name_116,
f14_.regon AS regon_117,
f14_.description AS description_118,
f14_.show_badge AS show_badge_119,
f14_.full_name AS full_name_120,
f14_.show_table AS show_table_121,
i15_.id AS id_122,
i15_.name AS name_123,
i15_.alt AS alt_124,
i15_.file AS file_125,
i15_.uuid AS uuid_126,
i15_.type AS type_127,
i15_.temp AS temp_128,
i15_.path AS path_129,
i15_.width AS width_130,
i15_.height AS height_131,
i15_.extension AS extension_132,
i15_.position AS position_133,
i15_.created_at AS created_at_134,
i15_.updated_at AS updated_at_135,
p16_.id AS id_136,
p16_.name AS name_137,
p16_.slug AS slug_138,
p16_.active AS active_139,
b3_.owner_id AS owner_id_140,
b3_.association_id AS association_id_141,
b7_.image_id AS image_id_142,
b7_.category_id AS category_id_143,
b8_.breed_id AS breed_id_144,
c9_.category_id AS category_id_145,
c9_.image_id AS image_id_146,
u10_.province_id AS province_id_147,
u10_.avatar_id AS avatar_id_148,
u10_.last_payment_address_id AS last_payment_address_id_149,
f11_.province_id AS province_id_150,
f11_.owner_id AS owner_id_151,
i12_.owner_id AS owner_id_152,
a13_.federation_id AS federation_id_153,
i15_.owner_id AS owner_id_154
FROM
breeding b3_
LEFT JOIN breeding_breed b17_ ON b3_.id = b17_.breeding_id
LEFT JOIN breed b7_ ON b7_.id = b17_.breed_id
LEFT JOIN breed_information b8_ ON b7_.id = b8_.breed_id
LEFT JOIN category c9_ ON b7_.category_id = c9_.id
LEFT JOIN `user` u10_ ON b3_.owner_id = u10_.id
LEFT JOIN foundation f11_ ON u10_.id = f11_.owner_id
LEFT JOIN breeding_images b18_ ON b3_.id = b18_.breeding_id
LEFT JOIN image i12_ ON i12_.id = b18_.image_id
LEFT JOIN association a13_ ON b3_.association_id = a13_.id
LEFT JOIN federation f14_ ON a13_.federation_id = f14_.id
LEFT JOIN image i15_ ON u10_.avatar_id = i15_.id
LEFT JOIN province p16_ ON u10_.province_id = p16_.id
LEFT JOIN offer o19_ ON u10_.id = o19_.owner_id
WHERE
u10_.is_blocked <> 1
AND u10_.is_verified = 1
AND u10_.active = 1
AND u10_.deleted_at IS NULL
AND b3_.id IN (
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
)
ORDER BY
sclr_0 DESC,
u10_.last_offer_added_at DESC,
b3_.id DESC,
b7_.name ASC,
i12_.position ASC
SELECT (CASE WHEN (SELECT COUNT(i0_.id) AS sclr_1 FROM breeding b1_ LEFT JOIN breeding_images b2_ ON b1_.id = b2_.breeding_id LEFT JOIN image i0_ ON i0_.id = b2_.image_id WHERE b1_.id = b3_.id) > 3 THEN 1 ELSE 0 END) + (CASE WHEN (SELECT COUNT(o4_.id) AS sclr_2 FROM breeding b5_ LEFT JOIN `user` u6_ ON b5_.owner_id = u6_.id LEFT JOIN offer o4_ ON u6_.id = o4_.owner_id WHERE b5_.id = b3_.id AND o4_.status = 'approved') > 0 THEN 2 ELSE 0 END) AS sclr_0, b3_.id AS id_3, b3_.name AS name_4, b3_.regon AS regon_5, b3_.description AS description_6, b3_.verified AS verified_7, b3_.association_custom AS association_custom_8, b3_.nickname AS nickname_9, b3_.facebook_url AS facebook_url_10, b3_.instagram_url AS instagram_url_11, b3_.web_url AS web_url_12, b3_.certificate_file AS certificate_file_13, b3_.certificate_file_status AS certificate_file_status_14, b3_.certificate_file_uploaded_at AS certificate_file_uploaded_at_15, b3_.certificate_file_rejected_reason AS certificate_file_rejected_reason_16, b3_.certificate_file_public AS certificate_file_public_17, b3_.deleted_at AS deleted_at_18, b7_.id AS id_19, b7_.name AS name_20, b7_.slug AS slug_21, b7_.description AS description_22, b7_.active AS active_23, b7_.breeding_description AS breeding_description_24, b7_.title AS title_25, b7_.meta_title AS meta_title_26, b7_.meta_keywords AS meta_keywords_27, b7_.meta_description AS meta_description_28, b8_.id AS id_29, b8_.name AS name_30, b8_.content AS content_31, b8_.stat_size AS stat_size_32, b8_.stat_exercises AS stat_exercises_33, b8_.stat_training AS stat_training_34, b8_.stat_hair_amount AS stat_hair_amount_35, b8_.stat_haircut_frequency AS stat_haircut_frequency_36, b8_.stat_kids AS stat_kids_37, b8_.stat_health AS stat_health_38, b8_.stat_costs AS stat_costs_39, b8_.stat_intelligence AS stat_intelligence_40, b8_.param_life AS param_life_41, b8_.param_weight_male AS param_weight_male_42, b8_.param_weight_female AS param_weight_female_43, b8_.param_growth AS param_growth_44, b8_.param_recognized_by_fci AS param_recognized_by_fci_45, b8_.blocks AS blocks_46, b8_.title AS title_47, b8_.meta_title AS meta_title_48, b8_.meta_keywords AS meta_keywords_49, b8_.meta_description AS meta_description_50, c9_.id AS id_51, c9_.name AS name_52, c9_.slug AS slug_53, c9_.description AS description_54, c9_.active AS active_55, c9_.position AS position_56, c9_.breeding_description AS breeding_description_57, c9_.title AS title_58, c9_.meta_title AS meta_title_59, c9_.meta_keywords AS meta_keywords_60, c9_.meta_description AS meta_description_61, u10_.id AS id_62, u10_.email AS email_63, u10_.roles AS roles_64, u10_.password AS password_65, u10_.firstname AS firstname_66, u10_.lastname AS lastname_67, u10_.phone AS phone_68, u10_.city AS city_69, u10_.postcode AS postcode_70, u10_.address AS address_71, u10_.active AS active_72, u10_.is_verified AS is_verified_73, u10_.uuid AS uuid_74, u10_.newsletter AS newsletter_75, u10_.is_blocked AS is_blocked_76, u10_.blocked_message AS blocked_message_77, u10_.blocked_date AS blocked_date_78, u10_.allow_auto_approval AS allow_auto_approval_79, u10_.type AS type_80, u10_.last_offer_added_at AS last_offer_added_at_81, u10_.delete_request_at AS delete_request_at_82, u10_.created_at AS created_at_83, u10_.updated_at AS updated_at_84, u10_.deleted_at AS deleted_at_85, f11_.id AS id_86, f11_.name AS name_87, f11_.phone AS phone_88, f11_.regon AS regon_89, f11_.address AS address_90, f11_.city AS city_91, f11_.postcode AS postcode_92, f11_.description AS description_93, f11_.facebook_url AS facebook_url_94, f11_.instagram_url AS instagram_url_95, f11_.web_url AS web_url_96, f11_.deleted_at AS deleted_at_97, i12_.id AS id_98, i12_.name AS name_99, i12_.alt AS alt_100, i12_.file AS file_101, i12_.uuid AS uuid_102, i12_.type AS type_103, i12_.temp AS temp_104, i12_.path AS path_105, i12_.width AS width_106, i12_.height AS height_107, i12_.extension AS extension_108, i12_.position AS position_109, i12_.created_at AS created_at_110, i12_.updated_at AS updated_at_111, a13_.id AS id_112, a13_.name AS name_113, a13_.regon AS regon_114, f14_.id AS id_115, f14_.name AS name_116, f14_.regon AS regon_117, f14_.description AS description_118, f14_.show_badge AS show_badge_119, f14_.full_name AS full_name_120, f14_.show_table AS show_table_121, i15_.id AS id_122, i15_.name AS name_123, i15_.alt AS alt_124, i15_.file AS file_125, i15_.uuid AS uuid_126, i15_.type AS type_127, i15_.temp AS temp_128, i15_.path AS path_129, i15_.width AS width_130, i15_.height AS height_131, i15_.extension AS extension_132, i15_.position AS position_133, i15_.created_at AS created_at_134, i15_.updated_at AS updated_at_135, p16_.id AS id_136, p16_.name AS name_137, p16_.slug AS slug_138, p16_.active AS active_139, b3_.owner_id AS owner_id_140, b3_.association_id AS association_id_141, b7_.image_id AS image_id_142, b7_.category_id AS category_id_143, b8_.breed_id AS breed_id_144, c9_.category_id AS category_id_145, c9_.image_id AS image_id_146, u10_.province_id AS province_id_147, u10_.avatar_id AS avatar_id_148, u10_.last_payment_address_id AS last_payment_address_id_149, f11_.province_id AS province_id_150, f11_.owner_id AS owner_id_151, i12_.owner_id AS owner_id_152, a13_.federation_id AS federation_id_153, i15_.owner_id AS owner_id_154 FROM breeding b3_ LEFT JOIN breeding_breed b17_ ON b3_.id = b17_.breeding_id LEFT JOIN breed b7_ ON b7_.id = b17_.breed_id LEFT JOIN breed_information b8_ ON b7_.id = b8_.breed_id LEFT JOIN category c9_ ON b7_.category_id = c9_.id LEFT JOIN `user` u10_ ON b3_.owner_id = u10_.id LEFT JOIN foundation f11_ ON u10_.id = f11_.owner_id LEFT JOIN breeding_images b18_ ON b3_.id = b18_.breeding_id LEFT JOIN image i12_ ON i12_.id = b18_.image_id LEFT JOIN association a13_ ON b3_.association_id = a13_.id LEFT JOIN federation f14_ ON a13_.federation_id = f14_.id LEFT JOIN image i15_ ON u10_.avatar_id = i15_.id LEFT JOIN province p16_ ON u10_.province_id = p16_.id LEFT JOIN offer o19_ ON u10_.id = o19_.owner_id WHERE u10_.is_blocked <> 1 AND u10_.is_verified = 1 AND u10_.active = 1 AND u10_.deleted_at IS NULL AND b3_.id IN (1479, 152, 3259, 992, 1237, 3250, 3239, 3248, 3247, 1148, 1946, 3062, 2976, 1850, 2887, 3087) ORDER BY sclr_0 DESC, u10_.last_offer_added_at DESC, b3_.id DESC, b7_.name ASC, i12_.position ASC;
|