20.89 ms (40.48%)
|
1 |
SELECT COUNT(DISTINCT s0_.id) AS sclr_0 FROM supplier_has_product s0_ LEFT JOIN product p1_ ON s0_.product_id = p1_.id LEFT JOIN supplier s2_ ON s0_.supplier_id = s2_.id LEFT JOIN product_category p3_ ON p1_.category_id = p3_.id LEFT JOIN hotel_exclude_product h4_ ON p1_.id = h4_.product_id WHERE (p1_.is_active IN (?, ?) AND s2_.is_active = ? AND s0_.is_active = ? AND s0_.price > 0) AND ((h4_.hotel_id = ? OR h4_.hotel_id IS NULL)) AND s2_.id IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) AND s2_.id NOT IN (?, ?) AND ((p1_.name LIKE ? OR p1_.id = ? OR p3_.name = ? OR s0_.supplier_code = ? OR p1_.manufacturer LIKE ?)) AND s2_.id = ?
Parameters: [
1
2
1
1
24
4
37
32
30
31
27
25
24
23
22
18
17
16
38
39
35
36
48
44
50
26
61
74
47
23
17
"%PŁATKI%"
"PŁATKI"
"PŁATKI"
"PŁATKI"
"PŁATKI"
"74"
]
SELECT COUNT(DISTINCT s0_.id) AS sclr_0 FROM supplier_has_product s0_ LEFT JOIN product p1_ ON s0_.product_id = p1_.id LEFT JOIN supplier s2_ ON s0_.supplier_id = s2_.id LEFT JOIN product_category p3_ ON p1_.category_id = p3_.id LEFT JOIN hotel_exclude_product h4_ ON p1_.id = h4_.product_id WHERE (p1_.is_active IN (1, 2) AND s2_.is_active = 1 AND s0_.is_active = 1 AND s0_.price > 0) AND ((h4_.hotel_id = 24 OR h4_.hotel_id IS NULL)) AND s2_.id IN (4, 37, 32, 30, 31, 27, 25, 24, 23, 22, 18, 17, 16, 38, 39, 35, 36, 48, 44, 50, 26, 61, 74, 47) AND s2_.id NOT IN (23, 17) AND ((p1_.name LIKE '%PŁATKI%' OR p1_.id = 'PŁATKI' OR p3_.name = 'PŁATKI' OR s0_.supplier_code = 'PŁATKI' OR p1_.manufacturer LIKE 'PŁATKI')) AND s2_.id = '74';
|
20.81 ms (40.33%)
|
1 |
SELECT DISTINCT s0_.id AS id_0, p1_.name AS name_1 FROM supplier_has_product s0_ LEFT JOIN product p1_ ON s0_.product_id = p1_.id LEFT JOIN supplier s2_ ON s0_.supplier_id = s2_.id LEFT JOIN product_category p3_ ON p1_.category_id = p3_.id LEFT JOIN hotel_exclude_product h4_ ON p1_.id = h4_.product_id WHERE (p1_.is_active IN (?, ?) AND s2_.is_active = ? AND s0_.is_active = ? AND s0_.price > 0) AND ((h4_.hotel_id = ? OR h4_.hotel_id IS NULL)) AND s2_.id IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) AND s2_.id NOT IN (?, ?) AND ((p1_.name LIKE ? OR p1_.id = ? OR p3_.name = ? OR s0_.supplier_code = ? OR p1_.manufacturer LIKE ?)) AND s2_.id = ? ORDER BY p1_.name ASC LIMIT 50
Parameters: [
1
2
1
1
24
4
37
32
30
31
27
25
24
23
22
18
17
16
38
39
35
36
48
44
50
26
61
74
47
23
17
"%PŁATKI%"
"PŁATKI"
"PŁATKI"
"PŁATKI"
"PŁATKI"
"74"
]
SELECT DISTINCT s0_.id AS id_0, p1_.name AS name_1 FROM supplier_has_product s0_ LEFT JOIN product p1_ ON s0_.product_id = p1_.id LEFT JOIN supplier s2_ ON s0_.supplier_id = s2_.id LEFT JOIN product_category p3_ ON p1_.category_id = p3_.id LEFT JOIN hotel_exclude_product h4_ ON p1_.id = h4_.product_id WHERE (p1_.is_active IN (1, 2) AND s2_.is_active = 1 AND s0_.is_active = 1 AND s0_.price > 0) AND ((h4_.hotel_id = 24 OR h4_.hotel_id IS NULL)) AND s2_.id IN (4, 37, 32, 30, 31, 27, 25, 24, 23, 22, 18, 17, 16, 38, 39, 35, 36, 48, 44, 50, 26, 61, 74, 47) AND s2_.id NOT IN (23, 17) AND ((p1_.name LIKE '%PŁATKI%' OR p1_.id = 'PŁATKI' OR p3_.name = 'PŁATKI' OR s0_.supplier_code = 'PŁATKI' OR p1_.manufacturer LIKE 'PŁATKI')) AND s2_.id = '74' ORDER BY p1_.name ASC LIMIT 50;
|
0.19 ms (0.36%)
|
1 |
SELECT s0_.id AS id_0, s0_.price AS price_1, s0_.supplier_code AS supplier_code_2, s0_.image AS image_3, s0_.last_price AS last_price_4, s0_.price_changed_at AS price_changed_at_5, s0_.price_last_at AS price_last_at_6, s0_.is_active AS is_active_7, s0_.extra_data AS extra_data_8, s0_.last_is_active AS last_is_active_9, s0_.supplier_id AS supplier_id_10, s0_.product_id AS product_id_11 FROM supplier_has_product s0_ LEFT JOIN product p1_ ON s0_.product_id = p1_.id LEFT JOIN supplier s2_ ON s0_.supplier_id = s2_.id LEFT JOIN product_category p3_ ON p1_.category_id = p3_.id LEFT JOIN hotel_exclude_product h4_ ON p1_.id = h4_.product_id WHERE (p1_.is_active IN (?, ?) AND s2_.is_active = ? AND s0_.is_active = ? AND s0_.price > 0) AND ((h4_.hotel_id = ? OR h4_.hotel_id IS NULL)) AND s2_.id IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) AND s2_.id NOT IN (?, ?) AND ((p1_.name LIKE ? OR p1_.id = ? OR p3_.name = ? OR s0_.supplier_code = ? OR p1_.manufacturer LIKE ?)) AND s2_.id = ? AND s0_.id IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ORDER BY p1_.name ASC
Parameters: [
1
2
1
1
24
4
37
32
30
31
27
25
24
23
22
18
17
16
38
39
35
36
48
44
50
26
61
74
47
23
17
"%PŁATKI%"
"PŁATKI"
"PŁATKI"
"PŁATKI"
"PŁATKI"
"74"
132977
151003
151014
153849
100161
77834
150130
83372
102519
150258
150262
116480
75936
123624
153843
97295
88144
97300
88115
123762
88077
78725
88073
78185
78138
116207
92797
98723
127741
104971
104978
119062
119070
119078
123755
88109
78155
132934
82511
151000
128300
136860
132954
132947
132940
132979
78162
132970
78169
132964
]
SELECT
s0_.id AS id_0,
s0_.price AS price_1,
s0_.supplier_code AS supplier_code_2,
s0_.image AS image_3,
s0_.last_price AS last_price_4,
s0_.price_changed_at AS price_changed_at_5,
s0_.price_last_at AS price_last_at_6,
s0_.is_active AS is_active_7,
s0_.extra_data AS extra_data_8,
s0_.last_is_active AS last_is_active_9,
s0_.supplier_id AS supplier_id_10,
s0_.product_id AS product_id_11
FROM
supplier_has_product s0_
LEFT JOIN product p1_ ON s0_.product_id = p1_.id
LEFT JOIN supplier s2_ ON s0_.supplier_id = s2_.id
LEFT JOIN product_category p3_ ON p1_.category_id = p3_.id
LEFT JOIN hotel_exclude_product h4_ ON p1_.id = h4_.product_id
WHERE
(
p1_.is_active IN (?, ?)
AND s2_.is_active = ?
AND s0_.is_active = ?
AND s0_.price > 0
)
AND (
(
h4_.hotel_id = ?
OR h4_.hotel_id IS NULL
)
)
AND s2_.id IN (
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?
)
AND s2_.id NOT IN (?, ?)
AND (
(
p1_.name LIKE ?
OR p1_.id = ?
OR p3_.name = ?
OR s0_.supplier_code = ?
OR p1_.manufacturer LIKE ?
)
)
AND s2_.id = ?
AND s0_.id IN (
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?
)
ORDER BY
p1_.name ASC
SELECT s0_.id AS id_0, s0_.price AS price_1, s0_.supplier_code AS supplier_code_2, s0_.image AS image_3, s0_.last_price AS last_price_4, s0_.price_changed_at AS price_changed_at_5, s0_.price_last_at AS price_last_at_6, s0_.is_active AS is_active_7, s0_.extra_data AS extra_data_8, s0_.last_is_active AS last_is_active_9, s0_.supplier_id AS supplier_id_10, s0_.product_id AS product_id_11 FROM supplier_has_product s0_ LEFT JOIN product p1_ ON s0_.product_id = p1_.id LEFT JOIN supplier s2_ ON s0_.supplier_id = s2_.id LEFT JOIN product_category p3_ ON p1_.category_id = p3_.id LEFT JOIN hotel_exclude_product h4_ ON p1_.id = h4_.product_id WHERE (p1_.is_active IN (1, 2) AND s2_.is_active = 1 AND s0_.is_active = 1 AND s0_.price > 0) AND ((h4_.hotel_id = 24 OR h4_.hotel_id IS NULL)) AND s2_.id IN (4, 37, 32, 30, 31, 27, 25, 24, 23, 22, 18, 17, 16, 38, 39, 35, 36, 48, 44, 50, 26, 61, 74, 47) AND s2_.id NOT IN (23, 17) AND ((p1_.name LIKE '%PŁATKI%' OR p1_.id = 'PŁATKI' OR p3_.name = 'PŁATKI' OR s0_.supplier_code = 'PŁATKI' OR p1_.manufacturer LIKE 'PŁATKI')) AND s2_.id = '74' AND s0_.id IN (132977, 151003, 151014, 153849, 100161, 77834, 150130, 83372, 102519, 150258, 150262, 116480, 75936, 123624, 153843, 97295, 88144, 97300, 88115, 123762, 88077, 78725, 88073, 78185, 78138, 116207, 92797, 98723, 127741, 104971, 104978, 119062, 119070, 119078, 123755, 88109, 78155, 132934, 82511, 151000, 128300, 136860, 132954, 132947, 132940, 132979, 78162, 132970, 78169, 132964) ORDER BY p1_.name ASC;
|
0.10 ms (0.20%)
|
1 |
SELECT t0.id AS id_1, t0.name AS name_2, t0.city AS city_3, t0.address AS address_4, t0.phone AS phone_5, t0.email AS email_6, t0.is_active AS is_active_7, t0.crated_at AS crated_at_8, t0.postcode AS postcode_9, t0.email_txt AS email_txt_10, t0.order_confirm_type AS order_confirm_type_11, t0.col_name AS col_name_12, t0.col_number AS col_number_13, t0.col_price AS col_price_14, t0.min_price AS min_price_15, t0.col_ean AS col_ean_16, t0.col_image AS col_image_17, t0.col_pieces AS col_pieces_18, t0.col_weight AS col_weight_19, t0.nip AS nip_20, t0.contact_name AS contact_name_21, t0.contact_surname AS contact_surname_22, t0.shortcut AS shortcut_23, t0.payment_term AS payment_term_24, t0.col_manufacture AS col_manufacture_25, t0.email_type AS email_type_26 FROM supplier t0 WHERE t0.id = ?
SELECT t0.id AS id_1, t0.name AS name_2, t0.city AS city_3, t0.address AS address_4, t0.phone AS phone_5, t0.email AS email_6, t0.is_active AS is_active_7, t0.crated_at AS crated_at_8, t0.postcode AS postcode_9, t0.email_txt AS email_txt_10, t0.order_confirm_type AS order_confirm_type_11, t0.col_name AS col_name_12, t0.col_number AS col_number_13, t0.col_price AS col_price_14, t0.min_price AS min_price_15, t0.col_ean AS col_ean_16, t0.col_image AS col_image_17, t0.col_pieces AS col_pieces_18, t0.col_weight AS col_weight_19, t0.nip AS nip_20, t0.contact_name AS contact_name_21, t0.contact_surname AS contact_surname_22, t0.shortcut AS shortcut_23, t0.payment_term AS payment_term_24, t0.col_manufacture AS col_manufacture_25, t0.email_type AS email_type_26 FROM supplier t0 WHERE t0.id = 74;
|