11.39 ms (36.99%)
|
1 |
WITH RECURSIVE category_tree AS (
SELECT
c.id as indexId,
c.id,
c.name,
c.trans,
0 as level,
CAST(name AS CHAR(1000)) as full_path,
c.icon
FROM categories c
WHERE c.visible = 1 AND (c.parent IS NULL OR c.parent = 0)
UNION ALL
SELECT
c.id as indexId,
c.id,
c.name,
c.trans,
ct.level + 1 as level,
CONCAT(ct.full_path, ' > ', c.name),
c.icon
FROM categories c
INNER JOIN category_tree ct
ON ct.id = c.parent
WHERE c.visible = 1
)
SELECT
*
FROM category_tree
ORDER BY full_path
WITH RECURSIVE category_tree AS (
SELECT
c.id as indexId,
c.id,
c.name,
c.trans,
0 as level,
CAST(name AS CHAR(1000)) as full_path,
c.icon
FROM categories c
WHERE c.visible = 1 AND (c.parent IS NULL OR c.parent = 0)
UNION ALL
SELECT
c.id as indexId,
c.id,
c.name,
c.trans,
ct.level + 1 as level,
CONCAT(ct.full_path, ' > ', c.name),
c.icon
FROM categories c
INNER JOIN category_tree ct
ON ct.id = c.parent
WHERE c.visible = 1
)
SELECT
*
FROM category_tree
ORDER BY full_path;
|
8.73 ms (28.34%)
|
1 |
SELECT s0_.id AS id_0, s0_.name AS name_1, s0_.logo AS logo_2, s0_.cover_image AS cover_image_3, s0_.url AS url_4, s0_.cashback AS cashback_5, s0_.featured AS featured_6, s0_.offline AS offline_7, s0_.status AS status_8, s0_.channel AS channel_9, s0_.ext_mapping AS ext_mapping_10, s0_.insert_date AS insert_date_11, COUNT(c1_.id) AS sclr_12, MAX(CASE WHEN f2_.id IS NOT NULL THEN 1 ELSE 0 END) AS sclr_13 FROM stores s0_ INNER JOIN countries_lnk c3_ ON (c3_.entity_type = 1 AND c3_.entity_id = s0_.id AND c3_.country = ?) LEFT JOIN coupons c1_ ON (c1_.store_id = s0_.id AND c1_.status = 1) LEFT JOIN favorites_lnk f2_ ON (f2_.store_id = s0_.id AND (f2_.user_id = ? OR (f2_.user_id IS NULL AND f2_.client_ip = ?))) WHERE s0_.status = ? AND s0_.featured = ? GROUP BY s0_.id LIMIT 10
Parameters: [
"1"
null
""
1
1
]
SELECT s0_.id AS id_0, s0_.name AS name_1, s0_.logo AS logo_2, s0_.cover_image AS cover_image_3, s0_.url AS url_4, s0_.cashback AS cashback_5, s0_.featured AS featured_6, s0_.offline AS offline_7, s0_.status AS status_8, s0_.channel AS channel_9, s0_.ext_mapping AS ext_mapping_10, s0_.insert_date AS insert_date_11, COUNT(c1_.id) AS sclr_12, MAX(CASE WHEN f2_.id IS NOT NULL THEN 1 ELSE 0 END) AS sclr_13 FROM stores s0_ INNER JOIN countries_lnk c3_ ON (c3_.entity_type = 1 AND c3_.entity_id = s0_.id AND c3_.country = '1') LEFT JOIN coupons c1_ ON (c1_.store_id = s0_.id AND c1_.status = 1) LEFT JOIN favorites_lnk f2_ ON (f2_.store_id = s0_.id AND (f2_.user_id = NULL OR (f2_.user_id IS NULL AND f2_.client_ip = ''))) WHERE s0_.status = 1 AND s0_.featured = 1 GROUP BY s0_.id LIMIT 10;
|
2.91 ms (9.45%)
|
4 |
SELECT t0.id AS id_1, t0.name_id AS name_id_2, t0.category_id AS category_id_3, t0.name AS name_4, t0.value AS value_5 FROM options t0 WHERE t0.name_id = ? AND t0.category_id = ? LIMIT 1
Parameters: [
"pref"
"settings"
]
SELECT t0.id AS id_1, t0.name_id AS name_id_2, t0.category_id AS category_id_3, t0.name AS name_4, t0.value AS value_5 FROM options t0 WHERE t0.name_id = 'pref' AND t0.category_id = 'settings' LIMIT 1;
|
1.92 ms (6.24%)
|
4 |
SELECT t0.id AS id_1, t0.name AS name_2, t0.image AS image_3, t0.controller AS controller_4, t0.config AS config_5, t0.active AS active_6, t0.insert_date AS insert_date_7, t0.channel_id AS channel_id_8 FROM integrations t0 WHERE t0.controller = ? LIMIT 1
Parameters: [
"App\Controller\Plugins\Integrations\Impact"
]
SELECT t0.id AS id_1, t0.name AS name_2, t0.image AS image_3, t0.controller AS controller_4, t0.config AS config_5, t0.active AS active_6, t0.insert_date AS insert_date_7, t0.channel_id AS channel_id_8 FROM integrations t0 WHERE t0.controller = 'App\\Controller\\Plugins\\Integrations\\Impact' LIMIT 1;
|
1.71 ms (5.54%)
|
4 |
SELECT t0.id AS id_1, t0.label_id AS label_id_2, t0.integration AS integration_3, t0.config AS config_4, t0.last_execution AS last_execution_5, t0.every_minutes AS every_minutes_6, t0.next_execution AS next_execution_7 FROM cron t0 WHERE t0.label_id = ? LIMIT 1
Parameters: [
"impact_fetch_data"
]
SELECT t0.id AS id_1, t0.label_id AS label_id_2, t0.integration AS integration_3, t0.config AS config_4, t0.last_execution AS last_execution_5, t0.every_minutes AS every_minutes_6, t0.next_execution AS next_execution_7 FROM cron t0 WHERE t0.label_id = 'impact_fetch_data' LIMIT 1;
|
1.43 ms (4.65%)
|
1 |
SELECT COUNT(DISTINCT s0_.id) AS sclr_0 FROM stores s0_ INNER JOIN countries_lnk c1_ ON (c1_.entity_type = 1 AND c1_.entity_id = s0_.id AND c1_.country = ?) WHERE s0_.status = ? AND s0_.featured = ?
SELECT COUNT(DISTINCT s0_.id) AS sclr_0 FROM stores s0_ INNER JOIN countries_lnk c1_ ON (c1_.entity_type = 1 AND c1_.entity_id = s0_.id AND c1_.country = '1') WHERE s0_.status = 1 AND s0_.featured = 1;
|
0.91 ms (2.94%)
|
2 |
SELECT t0.id AS id_1, t0.name_id AS name_id_2, t0.category_id AS category_id_3, t0.name AS name_4, t0.value AS value_5 FROM options t0 WHERE t0.category_id = ?
SELECT t0.id AS id_1, t0.name_id AS name_id_2, t0.category_id AS category_id_3, t0.name AS name_4, t0.value AS value_5 FROM options t0 WHERE t0.category_id = 'paths';
|
0.77 ms (2.49%)
|
1 |
SELECT t0.id AS id_1, t0.name AS name_2, t0.iso_code AS iso_code_3, t0.icon AS icon_4, t0.def_language AS def_language_5, t0.visible AS visible_6, t0.insert_date AS insert_date_7 FROM countries t0 WHERE t0.id = ?
SELECT t0.id AS id_1, t0.name AS name_2, t0.iso_code AS iso_code_3, t0.icon AS icon_4, t0.def_language AS def_language_5, t0.visible AS visible_6, t0.insert_date AS insert_date_7 FROM countries t0 WHERE t0.id = '1';
|
0.58 ms (1.88%)
|
1 |
SELECT t0.id AS id_1, t0.name AS name_2, t0.iso_code AS iso_code_3, t0.icon AS icon_4, t0.def_language AS def_language_5, t0.visible AS visible_6, t0.insert_date AS insert_date_7 FROM countries t0 WHERE t0.iso_code = ? LIMIT 1
SELECT t0.id AS id_1, t0.name AS name_2, t0.iso_code AS iso_code_3, t0.icon AS icon_4, t0.def_language AS def_language_5, t0.visible AS visible_6, t0.insert_date AS insert_date_7 FROM countries t0 WHERE t0.iso_code = 'US' LIMIT 1;
|
0.45 ms (1.47%)
|
1 |
SELECT t0.id AS id_1, t0.name AS name_2, t0.route AS route_3, t0.icon AS icon_4, t0.parent AS parent_5, t0.menu_position AS menu_position_6, t0.popup_open AS popup_open_7, t0.mandatory AS mandatory_8, t0.menu_default AS menu_default_9 FROM modules t0 WHERE t0.route = ? LIMIT 1
Parameters: [
"main_path"
]
SELECT t0.id AS id_1, t0.name AS name_2, t0.route AS route_3, t0.icon AS icon_4, t0.parent AS parent_5, t0.menu_position AS menu_position_6, t0.popup_open AS popup_open_7, t0.mandatory AS mandatory_8, t0.menu_default AS menu_default_9 FROM modules t0 WHERE t0.route = 'main_path' LIMIT 1;
|