Database Queries

31 duplicated queries found.

Всього 81 записи.
TimeDurationTypeDuplicatedQuery
   
03:29:47.2300.1 msSELECT1
SELECT * FROM languages WHERE visible=1 ORDER BY sort_order

03:29:47.2300.1 msSELECT2
SELECT MAX(updated_at) FROM languages

03:29:47.2300.1 msSELECT2
SELECT MAX(updated_at) FROM languages

03:29:47.2310.4 msSHOW1
SHOW FULL COLUMNS FROM `redirects`
03:29:47.2320.3 msSELECT1
SELECT `kcu`.`CONSTRAINT_NAME` AS `constraint_name`, `kcu`.`COLUMN_NAME` AS `column_name`, `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`, `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name` FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc` JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON ( `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL) ) AND `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME` WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database() AND `rc`.`TABLE_NAME` = 'redirects' AND `kcu`.`TABLE_NAME` = 'redirects'

03:29:47.2320.1 msSELECT1
SELECT * FROM `redirects` WHERE `from`='/tape/index/14'

03:29:47.2330.1 msSELECT3
SELECT * FROM `shop_currency` WHERE `id`=1

03:29:47.2330.6 msSHOW1
SHOW FULL COLUMNS FROM `shop_currency`
03:29:47.2340.2 msSELECT1
SELECT `kcu`.`CONSTRAINT_NAME` AS `constraint_name`, `kcu`.`COLUMN_NAME` AS `column_name`, `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`, `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name` FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc` JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON ( `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL) ) AND `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME` WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database() AND `rc`.`TABLE_NAME` = 'shop_currency' AND `kcu`.`TABLE_NAME` = 'shop_currency'

03:29:47.2340.5 msSHOW1
SHOW FULL COLUMNS FROM `shop_currency_lang`
03:29:47.2350.4 msSELECT1
SELECT `kcu`.`CONSTRAINT_NAME` AS `constraint_name`, `kcu`.`COLUMN_NAME` AS `column_name`, `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`, `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name` FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc` JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON ( `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL) ) AND `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME` WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database() AND `rc`.`TABLE_NAME` = 'shop_currency_lang' AND `kcu`.`TABLE_NAME` = 'shop_currency_lang'

03:29:47.2360.1 msSELECT3
SELECT * FROM `shop_currency_lang` WHERE `owner_id`=1

03:29:47.2360.1 msSELECT3
SELECT `id` FROM `shop_prices` WHERE `base_price`=1

03:29:47.2360.5 msSHOW1
SHOW FULL COLUMNS FROM `shop_tapes`
03:29:47.2370.4 msSELECT1
SELECT `kcu`.`CONSTRAINT_NAME` AS `constraint_name`, `kcu`.`COLUMN_NAME` AS `column_name`, `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`, `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name` FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc` JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON ( `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL) ) AND `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME` WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database() AND `rc`.`TABLE_NAME` = 'shop_tapes' AND `kcu`.`TABLE_NAME` = 'shop_tapes'

03:29:47.2370.1 msSELECT1
SELECT * FROM `shop_tapes` WHERE `id`=14

03:29:47.2380.4 msSHOW1
SHOW FULL COLUMNS FROM `shop_tapes_lang`
03:29:47.2380.3 msSELECT1
SELECT `kcu`.`CONSTRAINT_NAME` AS `constraint_name`, `kcu`.`COLUMN_NAME` AS `column_name`, `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`, `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name` FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc` JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON ( `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL) ) AND `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME` WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database() AND `rc`.`TABLE_NAME` = 'shop_tapes_lang' AND `kcu`.`TABLE_NAME` = 'shop_tapes_lang'

03:29:47.2390.2 msSELECT1
SELECT * FROM `shop_tapes_lang` WHERE (`language`='uk') AND (`owner_id`=14)

03:29:47.2390.1 msSELECT1
SELECT * FROM `shop_construct_product` WHERE `id`=55

03:29:47.2390.8 msSHOW1
SHOW FULL COLUMNS FROM `shop_construct_product`
03:29:47.2400.3 msSELECT1
SELECT `kcu`.`CONSTRAINT_NAME` AS `constraint_name`, `kcu`.`COLUMN_NAME` AS `column_name`, `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`, `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name` FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc` JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON ( `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL) ) AND `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME` WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database() AND `rc`.`TABLE_NAME` = 'shop_construct_product' AND `kcu`.`TABLE_NAME` = 'shop_construct_product'

03:29:47.2410.5 msSHOW1
SHOW FULL COLUMNS FROM `shop_construct_product_lang`
03:29:47.2410.3 msSELECT1
SELECT `kcu`.`CONSTRAINT_NAME` AS `constraint_name`, `kcu`.`COLUMN_NAME` AS `column_name`, `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`, `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name` FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc` JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON ( `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL) ) AND `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME` WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database() AND `rc`.`TABLE_NAME` = 'shop_construct_product_lang' AND `kcu`.`TABLE_NAME` = 'shop_construct_product_lang'

03:29:47.2420.1 msSELECT1
SELECT * FROM `shop_construct_product_lang` WHERE (`language`='uk') AND (`owner_id`=55)

03:29:47.2420.1 msSELECT1
SELECT * FROM `shop_construct_default_colors` WHERE `construct_id`=55

03:29:47.2420.1 msSELECT1
SELECT * FROM `shop_attributes_list` WHERE 0=1 ORDER BY `sort_order`

03:29:47.2420.1 msSELECT1
SELECT `id` FROM `user_type` WHERE `is_default_for_view`=1

03:29:47.2430.1 msSELECT2
SELECT `product_id` FROM `shop_construct_product_product` WHERE `construct_id`=55

03:29:47.2430.1 msSELECT1
SELECT EXISTS(SELECT * FROM `shop_construct_product_attribute` WHERE `construct_id`=55)

03:29:47.2430.1 msSELECT2
SELECT `product_id` FROM `shop_construct_product_product` WHERE `construct_id`=55

03:29:47.2440.5 msSHOW1
SHOW FULL COLUMNS FROM `shop_product`
03:29:47.2440.3 msSELECT1
SELECT `kcu`.`CONSTRAINT_NAME` AS `constraint_name`, `kcu`.`COLUMN_NAME` AS `column_name`, `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`, `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name` FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc` JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON ( `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL) ) AND `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME` WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database() AND `rc`.`TABLE_NAME` = 'shop_product' AND `kcu`.`TABLE_NAME` = 'shop_product'

03:29:47.2450.4 msSHOW1
SHOW FULL COLUMNS FROM `shop_product_lang`
03:29:47.2450.3 msSELECT1
SELECT `kcu`.`CONSTRAINT_NAME` AS `constraint_name`, `kcu`.`COLUMN_NAME` AS `column_name`, `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`, `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name` FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc` JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON ( `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL) ) AND `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME` WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database() AND `rc`.`TABLE_NAME` = 'shop_product_lang' AND `kcu`.`TABLE_NAME` = 'shop_product_lang'

03:29:47.2460.1 msSELECT1
SELECT `price_id` FROM `user_type` WHERE `is_default_for_view`=1

03:29:47.2460.7 msSELECT1
SELECT `t1`.`message` AS `message`, `t2`.`translation` AS `translation` FROM `source_message` `t1`, `message` `t2` WHERE (`t1`.`id`=`t2`.`id`) AND (`t1`.`category`='app') AND (`t2`.`language`='uk')

03:29:47.2480.1 msSELECT3
SELECT * FROM `shop_currency` WHERE `id`=1

03:29:47.2480.1 msSELECT3
SELECT * FROM `shop_currency_lang` WHERE `owner_id`=1

03:29:47.2492.4 msSELECT1
SELECT COUNT(*) FROM (SELECT `main`.`id`, `main`.`article`, `main`.`sort_order`, `lang`.`title` AS `selectTitle`, `lang`.`description` AS `selectDescription`, `category_lang`.`owner_id` AS `selectCategoryId`, `category_lang`.`title` AS `selectCategoryTitle`, `main`.`created_at` AS `created_at`, `pp`.`value` AS `typePrice`, CASE WHEN SUM(ps.quantity) > 0 THEN 1 ELSE 0 END AS `storeCount` FROM `shop_product` `main` LEFT JOIN `category_lang` `category_lang` ON main.parent_id=category_lang.owner_id LEFT JOIN `shop_product_lang` `lang` ON lang.owner_id=main.id LEFT JOIN `shop_product_prices` `pp` ON main.id=pp.product_id AND pp.price_id='1' LEFT JOIN `shop_product_prices` `ppr` ON main.id=ppr.product_id AND ppr.price_id=1 LEFT JOIN `shop_product_store` `ps` ON main.id=ps.product_id LEFT JOIN (SELECT `p`.`id`, SUM(ps.quantity) AS `sum`, `sub_p`.`count` AS `order` FROM `shop_product` `p` LEFT JOIN `shop_product_store` `ps` ON p.id=ps.product_id LEFT JOIN (SELECT `p`.`id`, COUNT(w.id) AS `count` FROM `shop_product` `p` LEFT JOIN `shop_wishlist` `w` ON p.id=w.product_id WHERE (`p`.`visible`=1) AND (`p`.`id` IN ('4', '103', '438', '474', '748', '971', '1017', '1058', '1081', '1178', '1179', '1192', '1204', '1206', '1225', '1339', '1386', '1644', '1650', '1749', '1821', '1839', '1840', '1858', '1919', '1963', '1985', '2030', '2031', '2219', '2336')) AND (`w`.`updated_at` BETWEEN 1747083600 AND 1747170000) GROUP BY `p`.`id`) AS sub_p ON sub_p.id=p.id WHERE (`p`.`visible`=1) AND (`p`.`id` IN ('4', '103', '438', '474', '748', '971', '1017', '1058', '1081', '1178', '1179', '1192', '1204', '1206', '1225', '1339', '1386', '1644', '1650', '1749', '1821', '1839', '1840', '1858', '1919', '1963', '1985', '2030', '2031', '2219', '2336')) GROUP BY `p`.`id` HAVING `sum` >= 1) subProductQuery ON subProductQuery.id=main.id WHERE ((`main`.`visible`=1) AND (`lang`.`language`='uk') AND (`category_lang`.`language`='uk')) AND (main.id IN (subProductQuery.id)) GROUP BY `main`.`id` ORDER BY `storeCount` DESC) `sub`

03:29:47.2512.1 msSELECT1
SELECT `main`.`id`, `main`.`article`, `main`.`sort_order`, `lang`.`title` AS `selectTitle`, `lang`.`description` AS `selectDescription`, `category_lang`.`owner_id` AS `selectCategoryId`, `category_lang`.`title` AS `selectCategoryTitle`, `main`.`created_at` AS `created_at`, `pp`.`value` AS `typePrice`, CASE WHEN SUM(ps.quantity) > 0 THEN 1 ELSE 0 END AS `storeCount` FROM `shop_product` `main` LEFT JOIN `category_lang` `category_lang` ON main.parent_id=category_lang.owner_id LEFT JOIN `shop_product_lang` `lang` ON lang.owner_id=main.id LEFT JOIN `shop_product_prices` `pp` ON main.id=pp.product_id AND pp.price_id='1' LEFT JOIN `shop_product_prices` `ppr` ON main.id=ppr.product_id AND ppr.price_id=1 LEFT JOIN `shop_product_store` `ps` ON main.id=ps.product_id LEFT JOIN (SELECT `p`.`id`, SUM(ps.quantity) AS `sum`, `sub_p`.`count` AS `order` FROM `shop_product` `p` LEFT JOIN `shop_product_store` `ps` ON p.id=ps.product_id LEFT JOIN (SELECT `p`.`id`, COUNT(w.id) AS `count` FROM `shop_product` `p` LEFT JOIN `shop_wishlist` `w` ON p.id=w.product_id WHERE (`p`.`visible`=1) AND (`p`.`id` IN ('4', '103', '438', '474', '748', '971', '1017', '1058', '1081', '1178', '1179', '1192', '1204', '1206', '1225', '1339', '1386', '1644', '1650', '1749', '1821', '1839', '1840', '1858', '1919', '1963', '1985', '2030', '2031', '2219', '2336')) AND (`w`.`updated_at` BETWEEN 1747083600 AND 1747170000) GROUP BY `p`.`id`) AS sub_p ON sub_p.id=p.id WHERE (`p`.`visible`=1) AND (`p`.`id` IN ('4', '103', '438', '474', '748', '971', '1017', '1058', '1081', '1178', '1179', '1192', '1204', '1206', '1225', '1339', '1386', '1644', '1650', '1749', '1821', '1839', '1840', '1858', '1919', '1963', '1985', '2030', '2031', '2219', '2336')) GROUP BY `p`.`id` HAVING `sum` >= 1) subProductQuery ON subProductQuery.id=main.id WHERE ((`main`.`visible`=1) AND (`lang`.`language`='uk') AND (`category_lang`.`language`='uk')) AND (main.id IN (subProductQuery.id)) GROUP BY `main`.`id` ORDER BY `storeCount` DESC, `sort_order` LIMIT 48

03:29:47.2530.1 msSELECT1
SELECT `id` FROM `shop_stores` WHERE `defstore`=1 ORDER BY `sort_order`

03:29:47.2540.1 msSELECT1
SELECT SUM(quantity) AS `in_stock`, `product_id` FROM `shop_product_store` WHERE (0=1) AND (`store_id`='1') GROUP BY `product_id`

03:29:47.2540.1 msSELECT1
SELECT `aliases`.`primaryKey`, `aliases`.`alias` FROM `aliases` `aliases` WHERE ((`aliases`.`model`='app\\modules\\shop\\models\\Product') AND (`aliases`.`redirectID`=0)) AND (0=1)

03:29:47.2540.1 msSELECT1
SELECT `img`.`product_id`, `img`.`id`, `img`.`path`, `img`.`process_updated_at`, `attr`.`attribute_id`, `attr`.`attribute_list_id`, `image_lang`.`alt`, `image_lang`.`title` FROM `shop_product_images` `img` LEFT JOIN `shop_product_images_attributes` `attr` ON attr.image_id = img.id LEFT JOIN `shop_product_images_lang` `image_lang` ON image_lang.owner_id = img.id WHERE (0=1) AND (`img`.`cover`=1)

03:29:47.2540.1 msSELECT1
SELECT `opts`.`product_id`, `opts`.`attribute_id`, `opts`.`value`, `list`.`sort_order`, `attr`.`type`, `listlang`.`title` AS `listValue`, `list`.`color`, SUM(store.quantity) AS `total_quantity`, `alang`.`title` AS `title` FROM `shop_product_store_options` `opts` LEFT JOIN `shop_attributes` `attr` ON attr.id=opts.attribute_id LEFT JOIN `shop_attributes_lang` `alang` ON alang.owner_id=opts.attribute_id AND alang.language='uk' LEFT JOIN `shop_product_store` `store` ON opts.store_id = store.id LEFT JOIN `shop_attributes_list` `list` ON list.id=opts.value LEFT JOIN `shop_attributes_list_lang` `listlang` ON listlang.owner_id=opts.value AND listlang.language='uk' WHERE 0=1 GROUP BY `opts`.`product_id`, `opts`.`attribute_id`, `opts`.`value`, `attr`.`type`, `listlang`.`title`, `list`.`color` ORDER BY `attr`.`sort_order`, `total_quantity` DESC

03:29:47.2540.1 msSELECT1
SELECT `lang`.`mark`, `shc`.`color`, `shc`.`bgcolor`, `shc`.`stroke_color`, `main`.`product_id`, `main`.`showcase_id` FROM `shop_product_showcases` `main` INNER JOIN `shop_showcases` `shc` ON main.showcase_id=shc.id INNER JOIN `shop_showcases_lang` `lang` ON main.showcase_id=lang.owner_id WHERE (`language`='uk') AND (0=1) ORDER BY `shc`.`sort_order`

03:29:47.2550.1 msSELECT3
SELECT SUM(quantity) FROM `shop_document_content` INNER JOIN `shop_document` ON `shop_document_content`.document_id=`shop_document`.id WHERE (`shop_document`.`user_id` IS NULL) AND (`shop_document`.`state_id` IS NULL)

03:29:47.2550.1 msSELECT3
SELECT `count_previous_month` FROM `custom_order_repository` WHERE `custom_order_repository`.`user_id` IS NULL

03:29:47.2550.1 msSELECT3
SELECT `count_previous_twelve_months` FROM `custom_order_repository` WHERE `custom_order_repository`.`user_id` IS NULL

03:29:47.2550.1 msSELECT3
SELECT `id` FROM `shop_prices` WHERE `base_price`=1

03:29:47.2550.1 msSELECT3
SELECT MAX(discount) FROM `discount_conditions` INNER JOIN `discount_status` ON `discount_conditions`.discount_status_id=`discount_status`.id WHERE (`discount_conditions`.`quantity_from` <= 139789) AND (`discount_conditions`.`quantity_to` >= 139789) AND (`discount_conditions`.`format`='moment') AND (`discount_status`.`type_user` IS NULL)

03:29:47.2550.1 msSELECT3
SELECT MAX(discount) FROM `discount_conditions` INNER JOIN `discount_status` ON `discount_conditions`.discount_status_id=`discount_status`.id WHERE (`discount_conditions`.`quantity_from` <= 0) AND (`discount_conditions`.`quantity_to` >= 0) AND (`discount_conditions`.`format`='previous_month') AND (`discount_status`.`type_user` IS NULL)

03:29:47.2560.1 msSELECT3
SELECT MAX(discount) FROM `discount_conditions` INNER JOIN `discount_status` ON `discount_conditions`.discount_status_id=`discount_status`.id WHERE (`discount_conditions`.`quantity_from` <= 0) AND (`discount_conditions`.`quantity_to` >= 0) AND (`discount_conditions`.`format`='previous_year') AND (`discount_status`.`type_user` IS NULL)

03:29:47.2560.1 msSELECT3
SELECT SUM(quantity) FROM `shop_document_content` INNER JOIN `shop_document` ON `shop_document_content`.document_id=`shop_document`.id WHERE (`shop_document`.`user_id` IS NULL) AND (`shop_document`.`state_id` IS NULL)

03:29:47.2560.0 msSELECT3
SELECT `count_previous_month` FROM `custom_order_repository` WHERE `custom_order_repository`.`user_id` IS NULL

03:29:47.2560.1 msSELECT3
SELECT `count_previous_twelve_months` FROM `custom_order_repository` WHERE `custom_order_repository`.`user_id` IS NULL

03:29:47.2560.1 msSELECT3
SELECT MAX(discount) FROM `discount_conditions` INNER JOIN `discount_status` ON `discount_conditions`.discount_status_id=`discount_status`.id WHERE (`discount_conditions`.`quantity_from` <= 139789) AND (`discount_conditions`.`quantity_to` >= 139789) AND (`discount_conditions`.`format`='moment') AND (`discount_status`.`type_user` IS NULL)

03:29:47.2560.1 msSELECT3
SELECT MAX(discount) FROM `discount_conditions` INNER JOIN `discount_status` ON `discount_conditions`.discount_status_id=`discount_status`.id WHERE (`discount_conditions`.`quantity_from` <= 0) AND (`discount_conditions`.`quantity_to` >= 0) AND (`discount_conditions`.`format`='previous_month') AND (`discount_status`.`type_user` IS NULL)

03:29:47.2560.1 msSELECT3
SELECT MAX(discount) FROM `discount_conditions` INNER JOIN `discount_status` ON `discount_conditions`.discount_status_id=`discount_status`.id WHERE (`discount_conditions`.`quantity_from` <= 0) AND (`discount_conditions`.`quantity_to` >= 0) AND (`discount_conditions`.`format`='previous_year') AND (`discount_status`.`type_user` IS NULL)

03:29:47.2570.1 msSELECT1
SELECT `discount` FROM `discount_conditions` INNER JOIN `discount_status` ON `discount_conditions`.discount_status_id=`discount_status`.id INNER JOIN `discount_status_lang` ON `discount_status_lang`.owner_id=`discount_status`.id WHERE (`discount_conditions`.`quantity_from` <= 139789) AND (`discount_conditions`.`quantity_to` >= 139789) AND (`discount_conditions`.`format`='moment') AND (`discount_status`.`type_user` IS NULL) AND (`discount_status_lang`.`language`='uk')

03:29:47.2570.1 msSELECT3
SELECT SUM(quantity) FROM `shop_document_content` INNER JOIN `shop_document` ON `shop_document_content`.document_id=`shop_document`.id WHERE (`shop_document`.`user_id` IS NULL) AND (`shop_document`.`state_id` IS NULL)

03:29:47.2570.1 msSELECT3
SELECT `count_previous_month` FROM `custom_order_repository` WHERE `custom_order_repository`.`user_id` IS NULL

03:29:47.2570.1 msSELECT3
SELECT `count_previous_twelve_months` FROM `custom_order_repository` WHERE `custom_order_repository`.`user_id` IS NULL

03:29:47.2570.1 msSELECT3
SELECT MAX(discount) FROM `discount_conditions` INNER JOIN `discount_status` ON `discount_conditions`.discount_status_id=`discount_status`.id WHERE (`discount_conditions`.`quantity_from` <= 139789) AND (`discount_conditions`.`quantity_to` >= 139789) AND (`discount_conditions`.`format`='moment') AND (`discount_status`.`type_user` IS NULL)

03:29:47.2570.1 msSELECT3
SELECT MAX(discount) FROM `discount_conditions` INNER JOIN `discount_status` ON `discount_conditions`.discount_status_id=`discount_status`.id WHERE (`discount_conditions`.`quantity_from` <= 0) AND (`discount_conditions`.`quantity_to` >= 0) AND (`discount_conditions`.`format`='previous_month') AND (`discount_status`.`type_user` IS NULL)

03:29:47.2580.1 msSELECT3
SELECT MAX(discount) FROM `discount_conditions` INNER JOIN `discount_status` ON `discount_conditions`.discount_status_id=`discount_status`.id WHERE (`discount_conditions`.`quantity_from` <= 0) AND (`discount_conditions`.`quantity_to` >= 0) AND (`discount_conditions`.`format`='previous_year') AND (`discount_status`.`type_user` IS NULL)

03:29:47.2580.1 msSELECT1
SELECT `discount_type` FROM `discount_conditions` INNER JOIN `discount_status` ON `discount_conditions`.discount_status_id=`discount_status`.id INNER JOIN `discount_status_lang` ON `discount_status_lang`.owner_id=`discount_status`.id WHERE (`discount_conditions`.`quantity_from` <= 139789) AND (`discount_conditions`.`quantity_to` >= 139789) AND (`discount_conditions`.`format`='moment') AND (`discount_status`.`type_user` IS NULL) AND (`discount_status_lang`.`language`='uk')

03:29:47.2580.5 msSHOW1
SHOW FULL COLUMNS FROM `promotions`
03:29:47.2590.2 msSELECT1
SELECT `kcu`.`CONSTRAINT_NAME` AS `constraint_name`, `kcu`.`COLUMN_NAME` AS `column_name`, `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`, `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name` FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc` JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON ( `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL) ) AND `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME` WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database() AND `rc`.`TABLE_NAME` = 'promotions' AND `kcu`.`TABLE_NAME` = 'promotions'

03:29:47.2590.4 msSHOW1
SHOW FULL COLUMNS FROM `promotions_lang`
03:29:47.2600.3 msSELECT1
SELECT `kcu`.`CONSTRAINT_NAME` AS `constraint_name`, `kcu`.`COLUMN_NAME` AS `column_name`, `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`, `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name` FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc` JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON ( `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL) ) AND `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME` WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database() AND `rc`.`TABLE_NAME` = 'promotions_lang' AND `kcu`.`TABLE_NAME` = 'promotions_lang'

03:29:47.2600.1 msSELECT1
SELECT `promotions`.* FROM `promotions` LEFT JOIN `shop_document` ON `promotions`.`id` = `shop_document`.`promotion_id` WHERE (`shop_document`.`user_id` IS NULL) AND (`shop_document`.`id` IS NULL)

03:29:47.2600.1 msSELECT1
SELECT * FROM `shop_document` WHERE `promotion_id`=1

03:29:47.2610.1 msSELECT1
SELECT * FROM `promotions_lang` WHERE (`language`='uk') AND (`owner_id`=1)

03:29:47.2610.1 msSELECT3
SELECT * FROM `shop_currency` WHERE `id`=1

03:29:47.2610.1 msSELECT3
SELECT * FROM `shop_currency_lang` WHERE `owner_id`=1

03:29:47.2620.1 msSELECT1
SELECT SUM(quantity) FROM `shop_document_content` INNER JOIN `shop_document` ON `shop_document_content`.document_id=`shop_document`.id WHERE (`shop_document`.`session_id`='2krje7u50eun9s22oj3l91dbkv') AND (`shop_document`.`state_id` IS NULL)

03:29:47.2620.0 msSELECT3
SELECT `id` FROM `shop_prices` WHERE `base_price`=1

03:29:47.2620.0 msSELECT1
SELECT `shop_prices`.`percent`, `value`, `discount_value`, `product_id`, `shop_prices_lang`.`price_info`, `shop_prices_lang`.`title`, `shop_product`.`parent_id` FROM `shop_product_prices` LEFT JOIN `shop_prices` ON `shop_prices`.id=`shop_product_prices`.price_id LEFT JOIN `shop_prices_lang` ON `shop_prices`.id=`shop_prices_lang`.owner_id LEFT JOIN `shop_product` ON `shop_product`.id=`shop_product_prices`.product_id WHERE (0=1) AND (`price_id`='1') AND (`shop_prices_lang`.`language`='uk')

03:29:47.2620.0 msSELECT1
SELECT `shop_prices`.`percent`, `value`, `discount_value`, `product_id`, `shop_prices_lang`.`price_info`, `shop_prices_lang`.`title`, `shop_product`.`parent_id` FROM `shop_product_prices` LEFT JOIN `shop_prices` ON `shop_prices`.id=`shop_product_prices`.price_id LEFT JOIN `shop_prices_lang` ON `shop_prices`.id=`shop_prices_lang`.owner_id LEFT JOIN `shop_product` ON `shop_product`.id=`shop_product_prices`.product_id WHERE (0=1) AND (`price_id`=1) AND (`shop_prices_lang`.`language`='uk')