Database Queries

29 duplicated queries found.

Всего 69 записи.
TimeDurationTypeDuplicatedQuery
   
22:38:10.9020.1 msSELECT1
SELECT * FROM languages WHERE visible=1 ORDER BY sort_order

22:38:10.9020.1 msSELECT2
SELECT MAX(updated_at) FROM languages

22:38:10.9020.1 msSELECT2
SELECT MAX(updated_at) FROM languages

22:38:10.9030.4 msSHOW1
SHOW FULL COLUMNS FROM `redirects`
22:38:10.9030.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` = 'redirects' AND `kcu`.`TABLE_NAME` = 'redirects'

22:38:10.9040.1 msSELECT1
SELECT * FROM `redirects` WHERE `from`='/tape/index/1'

22:38:10.9040.1 msSELECT3
SELECT * FROM `shop_currency` WHERE `id`=1

22:38:10.9040.6 msSHOW1
SHOW FULL COLUMNS FROM `shop_currency`
22:38:10.9050.5 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'

22:38:10.9060.6 msSHOW1
SHOW FULL COLUMNS FROM `shop_currency_lang`
22:38:10.9070.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_currency_lang' AND `kcu`.`TABLE_NAME` = 'shop_currency_lang'

22:38:10.9070.1 msSELECT3
SELECT * FROM `shop_currency_lang` WHERE `owner_id`=1

22:38:10.9080.1 msSELECT3
SELECT `id` FROM `shop_prices` WHERE `base_price`=1

22:38:10.9080.7 msSHOW1
SHOW FULL COLUMNS FROM `shop_tapes`
22:38:10.9090.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' AND `kcu`.`TABLE_NAME` = 'shop_tapes'

22:38:10.9090.1 msSELECT1
SELECT * FROM `shop_tapes` WHERE `id`=1

22:38:10.9100.5 msSHOW1
SHOW FULL COLUMNS FROM `shop_tapes_lang`
22:38:10.9100.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_lang' AND `kcu`.`TABLE_NAME` = 'shop_tapes_lang'

22:38:10.9110.1 msSELECT1
SELECT * FROM `shop_tapes_lang` WHERE (`language`='ru') AND (`owner_id`=1)

22:38:10.9110.5 msSHOW1
SHOW FULL COLUMNS FROM `shop_product`
22:38:10.9120.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'

22:38:10.9120.5 msSHOW1
SHOW FULL COLUMNS FROM `shop_product_lang`
22:38:10.9130.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'

22:38:10.9140.1 msSELECT1
SELECT `price_id` FROM `user_type` WHERE `is_default_for_view`=1

22:38:10.9140.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`='ru')

22:38:10.9160.1 msSELECT3
SELECT * FROM `shop_currency` WHERE `id`=1

22:38:10.9160.1 msSELECT3
SELECT * FROM `shop_currency_lang` WHERE `owner_id`=1

22:38:10.9171.2 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 `pv`.`product_id` AS `id`, `pv`.`created_at` AS `created_at` FROM `shop_product_views` `pv` WHERE `pv`.`session_id`='6mpnbs0edtohusrdqj2m88qmrl') subProductQuery ON subProductQuery.id=main.id WHERE ((`main`.`visible`=1) AND (`lang`.`language`='ru') AND (`category_lang`.`language`='ru')) AND (main.id IN (subProductQuery.id)) GROUP BY `main`.`id` ORDER BY `storeCount` DESC) `sub`

22:38:10.9180.8 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 `pv`.`product_id` AS `id`, `pv`.`created_at` AS `created_at` FROM `shop_product_views` `pv` WHERE `pv`.`session_id`='6mpnbs0edtohusrdqj2m88qmrl') subProductQuery ON subProductQuery.id=main.id WHERE ((`main`.`visible`=1) AND (`lang`.`language`='ru') AND (`category_lang`.`language`='ru')) AND (main.id IN (subProductQuery.id)) GROUP BY `main`.`id` ORDER BY `storeCount` DESC, `sort_order` LIMIT 12

22:38:10.9190.1 msSELECT1
SELECT `id` FROM `shop_stores` WHERE `defstore`=1 ORDER BY `sort_order`

22:38:10.9190.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`

22:38:10.9190.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)

22:38:10.9190.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)

22:38:10.9190.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='ru' 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='ru' 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

22:38:10.9200.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`='ru') AND (0=1) ORDER BY `shc`.`sort_order`

22:38:10.9200.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)

22:38:10.9200.1 msSELECT3
SELECT `count_previous_month` FROM `custom_order_repository` WHERE `custom_order_repository`.`user_id` IS NULL

22:38:10.9200.1 msSELECT3
SELECT `count_previous_twelve_months` FROM `custom_order_repository` WHERE `custom_order_repository`.`user_id` IS NULL

22:38:10.9200.1 msSELECT3
SELECT `id` FROM `shop_prices` WHERE `base_price`=1

22:38:10.9210.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)

22:38:10.9210.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)

22:38:10.9210.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)

22:38:10.9210.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)

22:38:10.9210.1 msSELECT3
SELECT `count_previous_month` FROM `custom_order_repository` WHERE `custom_order_repository`.`user_id` IS NULL

22:38:10.9210.1 msSELECT3
SELECT `count_previous_twelve_months` FROM `custom_order_repository` WHERE `custom_order_repository`.`user_id` IS NULL

22:38:10.9210.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)

22:38:10.9220.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)

22:38:10.9220.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)

22:38:10.9220.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`='ru')

22:38:10.9220.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)

22:38:10.9220.1 msSELECT3
SELECT `count_previous_month` FROM `custom_order_repository` WHERE `custom_order_repository`.`user_id` IS NULL

22:38:10.9220.1 msSELECT3
SELECT `count_previous_twelve_months` FROM `custom_order_repository` WHERE `custom_order_repository`.`user_id` IS NULL

22:38:10.9230.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)

22:38:10.9230.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)

22:38:10.9230.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)

22:38:10.9230.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`='ru')

22:38:10.9230.5 msSHOW1
SHOW FULL COLUMNS FROM `promotions`
22:38:10.9240.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' AND `kcu`.`TABLE_NAME` = 'promotions'

22:38:10.9250.4 msSHOW1
SHOW FULL COLUMNS FROM `promotions_lang`
22:38:10.9250.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_lang' AND `kcu`.`TABLE_NAME` = 'promotions_lang'

22:38:10.9260.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)

22:38:10.9260.1 msSELECT1
SELECT * FROM `shop_document` WHERE `promotion_id`=1

22:38:10.9260.1 msSELECT1
SELECT * FROM `promotions_lang` WHERE (`language`='ru') AND (`owner_id`=1)

22:38:10.9260.1 msSELECT3
SELECT * FROM `shop_currency` WHERE `id`=1

22:38:10.9270.1 msSELECT3
SELECT * FROM `shop_currency_lang` WHERE `owner_id`=1

22:38:10.9270.4 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`='6mpnbs0edtohusrdqj2m88qmrl') AND (`shop_document`.`state_id` IS NULL)

22:38:10.9270.1 msSELECT3
SELECT `id` FROM `shop_prices` WHERE `base_price`=1

22:38:10.9280.1 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`='ru')

22:38:10.9280.1 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`='ru')