Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Time: 2019-12-30T15:19:16.393356Z #
- # User@Host: engraved_live[engraved_live] @ localhost [] Id: 78111 #
- # Query_time: 1.362463 Lock_time: 0.000444 Rows_sent: 12 Rows_examined: 257991 #
- # SET timestamp = 1577719156; #
- SELECT `main_table`.*,
- `default_option_title`.`title` AS `default_title`,
- `store_option_title`.`title` AS `store_title`,
- IF(store_option_title.title IS NULL, default_option_title.title,
- store_option_title.title) AS `title`,
- `default_option_price`.`price` AS `default_price`,
- `default_option_price`.`price_type` AS `default_price_type`,
- `store_option_price`.`price` AS `store_price`,
- `store_option_price`.`price_type` AS `store_price_type`,
- IF(store_option_price.price IS NULL, default_option_price.price,
- store_option_price.price) AS `price`,
- IF(store_option_price.price_type IS NULL, default_option_price.price_type,
- store_option_price.price_type) AS `price_type`,
- `mageworx_option_title`.`mageworx_option_title`,
- `mageworx_option_price`.`mageworx_option_price`,
- `mageworx_option_dependency`.`dependency` AS `field_hidden_dependency`,
- `option_description`.`description`,
- IF(main_table.is_all_groups = 1, 1,
- IF(option_customer_group.customer_group_id IS NULL, 0, 1)) AS `visibility_by_customer_group_id`,
- IF(main_table.is_all_websites = 1, 1,
- IF(option_store_view.customer_store_id IS NULL, 0, 1)) AS `visibility_by_customer_store_id`
- FROM `catalog_product_option` AS `main_table`
- INNER JOIN `catalog_product_entity` AS `cpe` ON cpe.entity_id = main_table.product_id
- INNER JOIN `catalog_product_option_title` AS `default_option_title`
- ON default_option_title.option_id = main_table.option_id
- LEFT JOIN `catalog_product_option_title` AS `store_option_title`
- ON store_option_title.option_id = main_table.option_id AND store_option_title.store_id = '1'
- LEFT JOIN `catalog_product_option_price` AS `default_option_price`
- ON default_option_price.option_id = main_table.option_id AND default_option_price.store_id = 0
- LEFT JOIN `catalog_product_option_price` AS `store_option_price`
- ON store_option_price.option_id = main_table.option_id AND store_option_price.store_id = '1'
- LEFT JOIN (SELECT option_id as magento_title_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', store_id, '",', '"title"', ':"', title, '"}')),
- ']') AS mageworx_option_title
- FROM catalog_product_option_title
- GROUP BY option_id) AS `mageworx_option_title`
- ON main_table.option_id = mageworx_option_title.magento_title_option_id
- LEFT JOIN (SELECT option_id as magento_price_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', store_id, '",', '"price_type"', ':"', price_type, '",',
- '"price"', ':"', price, '"}')), ']') AS mageworx_option_price
- FROM catalog_product_option_price
- GROUP BY option_id) AS `mageworx_option_price`
- ON main_table.option_id = mageworx_option_price.magento_price_option_id
- LEFT JOIN (SELECT `mageworx_option_dependency`.`child_option_id`,
- concat('[', group_concat(concat('["', parent_option_id, '","', parent_option_type_id, '"]')),
- ']') AS `dependency`
- FROM `mageworx_option_dependency`
- WHERE (child_option_type_id = '')
- GROUP BY `child_option_id`) AS `mageworx_option_dependency`
- ON mageworx_option_dependency.child_option_id = main_table.mageworx_option_id
- LEFT JOIN (SELECT mageworx_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', IFNULL(store_id, ''), '",', '"description"', ':"',
- IFNULL(description, ''), '"}')), ']') AS description
- FROM mageworx_optionfeatures_option_description
- GROUP BY mageworx_option_id) AS `option_description`
- ON main_table.mageworx_option_id = option_description.mageworx_option_id
- LEFT JOIN `mageworx_optionvisibility_option_customer_group` AS `option_customer_group`
- ON main_table.mageworx_option_id = option_customer_group.mageworx_option_id AND
- option_customer_group.customer_group_id = '0'
- LEFT JOIN `mageworx_optionvisibility_option_store_view` AS `option_store_view`
- ON main_table.mageworx_option_id = option_store_view.mageworx_option_id AND
- option_store_view.customer_store_id = '1'
- WHERE (default_option_title.store_id = 0)
- AND (`product_id` IN (1240))
- AND (`main_table`.`disabled` = '0')
- AND (`main_table`.`disabled_by_values` = '0')
- HAVING (visibility_by_customer_group_id)
- AND (visibility_by_customer_store_id);
- # Time: 2019-12-30T15:19:18.053112Z #
- # User@Host: engraved_live[engraved_live] @ localhost [] Id: 78111 #
- # Query_time: 1.381452 Lock_time: 0.000428 Rows_sent: 14 Rows_examined: 254523 #
- # SET timestamp = 1577719158; #
- SELECT `main_table`.*,
- `default_option_title`.`title` AS `default_title`,
- `store_option_title`.`title` AS `store_title`,
- IF(store_option_title.title IS NULL, default_option_title.title,
- store_option_title.title) AS `title`,
- `default_option_price`.`price` AS `default_price`,
- `default_option_price`.`price_type` AS `default_price_type`,
- `store_option_price`.`price` AS `store_price`,
- `store_option_price`.`price_type` AS `store_price_type`,
- IF(store_option_price.price IS NULL, default_option_price.price,
- store_option_price.price) AS `price`,
- IF(store_option_price.price_type IS NULL, default_option_price.price_type,
- store_option_price.price_type) AS `price_type`,
- `mageworx_option_title`.`mageworx_option_title`,
- `mageworx_option_price`.`mageworx_option_price`,
- `mageworx_option_dependency`.`dependency` AS `field_hidden_dependency`,
- `option_description`.`description`,
- IF(main_table.is_all_groups = 1, 1,
- IF(option_customer_group.customer_group_id IS NULL, 0, 1)) AS `visibility_by_customer_group_id`,
- IF(main_table.is_all_websites = 1, 1,
- IF(option_store_view.customer_store_id IS NULL, 0, 1)) AS `visibility_by_customer_store_id`
- FROM `catalog_product_option` AS `main_table`
- INNER JOIN `catalog_product_entity` AS `cpe` ON cpe.entity_id = main_table.product_id
- INNER JOIN `catalog_product_option_title` AS `default_option_title`
- ON default_option_title.option_id = main_table.option_id
- LEFT JOIN `catalog_product_option_title` AS `store_option_title`
- ON store_option_title.option_id = main_table.option_id AND store_option_title.store_id = 1
- LEFT JOIN `catalog_product_option_price` AS `default_option_price`
- ON default_option_price.option_id = main_table.option_id AND default_option_price.store_id = 0
- LEFT JOIN `catalog_product_option_price` AS `store_option_price`
- ON store_option_price.option_id = main_table.option_id AND store_option_price.store_id = 1
- LEFT JOIN (SELECT option_id as magento_title_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', store_id, '",', '"title"', ':"', title, '"}')),
- ']') AS mageworx_option_title
- FROM catalog_product_option_title
- GROUP BY option_id) AS `mageworx_option_title`
- ON main_table.option_id = mageworx_option_title.magento_title_option_id
- LEFT JOIN (SELECT option_id as magento_price_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', store_id, '",', '"price_type"', ':"', price_type, '",',
- '"price"', ':"', price, '"}')), ']') AS mageworx_option_price
- FROM catalog_product_option_price
- GROUP BY option_id) AS `mageworx_option_price`
- ON main_table.option_id = mageworx_option_price.magento_price_option_id
- LEFT JOIN (SELECT `mageworx_option_dependency`.`child_option_id`,
- concat('[', group_concat(concat('["', parent_option_id, '","', parent_option_type_id, '"]')),
- ']') AS `dependency`
- FROM `mageworx_option_dependency`
- WHERE (child_option_type_id = '' AND product_id = '1624')
- GROUP BY `child_option_id`) AS `mageworx_option_dependency`
- ON mageworx_option_dependency.child_option_id = main_table.mageworx_option_id
- LEFT JOIN (SELECT mageworx_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', IFNULL(store_id, ''), '",', '"description"', ':"',
- IFNULL(description, ''), '"}')), ']') AS description
- FROM mageworx_optionfeatures_option_description
- GROUP BY mageworx_option_id) AS `option_description`
- ON main_table.mageworx_option_id = option_description.mageworx_option_id
- LEFT JOIN `mageworx_optionvisibility_option_customer_group` AS `option_customer_group`
- ON main_table.mageworx_option_id = option_customer_group.mageworx_option_id AND
- option_customer_group.customer_group_id = '0'
- LEFT JOIN `mageworx_optionvisibility_option_store_view` AS `option_store_view`
- ON main_table.mageworx_option_id = option_store_view.mageworx_option_id AND
- option_store_view.customer_store_id = '1'
- WHERE (`cpe`.`entity_id` = '1624')
- AND (default_option_title.store_id = 0)
- AND (`main_table`.`disabled` = '0')
- AND (`main_table`.`disabled_by_values` = '0')
- HAVING (visibility_by_customer_group_id)
- AND (visibility_by_customer_store_id)
- ORDER BY sort_order ASC, title ASC;
- # Time: 2019-12-30T15:19:21.118574Z #
- # User@Host: engraved_live[engraved_live] @ localhost [] Id: 78111 #
- # Query_time: 1.351287 Lock_time: 0.000477 Rows_sent: 14 Rows_examined: 254523 #
- # SET timestamp = 1577719161; #
- SELECT `main_table`.*,
- `default_option_title`.`title` AS `default_title`,
- `store_option_title`.`title` AS `store_title`,
- IF(store_option_title.title IS NULL, default_option_title.title,
- store_option_title.title) AS `title`,
- `default_option_price`.`price` AS `default_price`,
- `default_option_price`.`price_type` AS `default_price_type`,
- `store_option_price`.`price` AS `store_price`,
- `store_option_price`.`price_type` AS `store_price_type`,
- IF(store_option_price.price IS NULL, default_option_price.price,
- store_option_price.price) AS `price`,
- IF(store_option_price.price_type IS NULL, default_option_price.price_type,
- store_option_price.price_type) AS `price_type`,
- `mageworx_option_title`.`mageworx_option_title`,
- `mageworx_option_price`.`mageworx_option_price`,
- `mageworx_option_dependency`.`dependency` AS `field_hidden_dependency`,
- `option_description`.`description`,
- IF(main_table.is_all_groups = 1, 1,
- IF(option_customer_group.customer_group_id IS NULL, 0, 1)) AS `visibility_by_customer_group_id`,
- IF(main_table.is_all_websites = 1, 1,
- IF(option_store_view.customer_store_id IS NULL, 0, 1)) AS `visibility_by_customer_store_id`
- FROM `catalog_product_option` AS `main_table`
- INNER JOIN `catalog_product_entity` AS `cpe` ON cpe.entity_id = main_table.product_id
- INNER JOIN `catalog_product_option_title` AS `default_option_title`
- ON default_option_title.option_id = main_table.option_id
- LEFT JOIN `catalog_product_option_title` AS `store_option_title`
- ON store_option_title.option_id = main_table.option_id AND store_option_title.store_id = 1
- LEFT JOIN `catalog_product_option_price` AS `default_option_price`
- ON default_option_price.option_id = main_table.option_id AND default_option_price.store_id = 0
- LEFT JOIN `catalog_product_option_price` AS `store_option_price`
- ON store_option_price.option_id = main_table.option_id AND store_option_price.store_id = 1
- LEFT JOIN (SELECT option_id as magento_title_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', store_id, '",', '"title"', ':"', title, '"}')),
- ']') AS mageworx_option_title
- FROM catalog_product_option_title
- GROUP BY option_id) AS `mageworx_option_title`
- ON main_table.option_id = mageworx_option_title.magento_title_option_id
- LEFT JOIN (SELECT option_id as magento_price_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', store_id, '",', '"price_type"', ':"', price_type, '",',
- '"price"', ':"', price, '"}')), ']') AS mageworx_option_price
- FROM catalog_product_option_price
- GROUP BY option_id) AS `mageworx_option_price`
- ON main_table.option_id = mageworx_option_price.magento_price_option_id
- LEFT JOIN (SELECT `mageworx_option_dependency`.`child_option_id`,
- concat('[', group_concat(concat('["', parent_option_id, '","', parent_option_type_id, '"]')),
- ']') AS `dependency`
- FROM `mageworx_option_dependency`
- WHERE (child_option_type_id = '' AND product_id = '1624')
- GROUP BY `child_option_id`) AS `mageworx_option_dependency`
- ON mageworx_option_dependency.child_option_id = main_table.mageworx_option_id
- LEFT JOIN (SELECT mageworx_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', IFNULL(store_id, ''), '",', '"description"', ':"',
- IFNULL(description, ''), '"}')), ']') AS description
- FROM mageworx_optionfeatures_option_description
- GROUP BY mageworx_option_id) AS `option_description`
- ON main_table.mageworx_option_id = option_description.mageworx_option_id
- LEFT JOIN `mageworx_optionvisibility_option_customer_group` AS `option_customer_group`
- ON main_table.mageworx_option_id = option_customer_group.mageworx_option_id AND
- option_customer_group.customer_group_id = '0'
- LEFT JOIN `mageworx_optionvisibility_option_store_view` AS `option_store_view`
- ON main_table.mageworx_option_id = option_store_view.mageworx_option_id AND
- option_store_view.customer_store_id = '1'
- WHERE (`cpe`.`entity_id` = '1624')
- AND (default_option_title.store_id = 0)
- AND (`main_table`.`disabled` = '0')
- AND (`main_table`.`disabled_by_values` = '0')
- HAVING (visibility_by_customer_group_id)
- AND (visibility_by_customer_store_id)
- ORDER BY sort_order ASC, title ASC;
- # Time: 2019-12-30T15:19:31.128572Z #
- # User@Host: engraved_live[engraved_live] @ localhost [] Id: 78118 #
- # Query_time: 1.465038 Lock_time: 0.001490 Rows_sent: 12 Rows_examined: 257991 #
- # SET timestamp = 1577719171; #
- SELECT `main_table`.*,
- `default_option_title`.`title` AS `default_title`,
- `store_option_title`.`title` AS `store_title`,
- IF(store_option_title.title IS NULL, default_option_title.title,
- store_option_title.title) AS `title`,
- `default_option_price`.`price` AS `default_price`,
- `default_option_price`.`price_type` AS `default_price_type`,
- `store_option_price`.`price` AS `store_price`,
- `store_option_price`.`price_type` AS `store_price_type`,
- IF(store_option_price.price IS NULL, default_option_price.price,
- store_option_price.price) AS `price`,
- IF(store_option_price.price_type IS NULL, default_option_price.price_type,
- store_option_price.price_type) AS `price_type`,
- `mageworx_option_title`.`mageworx_option_title`,
- `mageworx_option_price`.`mageworx_option_price`,
- `mageworx_option_dependency`.`dependency` AS `field_hidden_dependency`,
- `option_description`.`description`,
- IF(main_table.is_all_groups = 1, 1,
- IF(option_customer_group.customer_group_id IS NULL, 0, 1)) AS `visibility_by_customer_group_id`,
- IF(main_table.is_all_websites = 1, 1,
- IF(option_store_view.customer_store_id IS NULL, 0, 1)) AS `visibility_by_customer_store_id`
- FROM `catalog_product_option` AS `main_table`
- INNER JOIN `catalog_product_entity` AS `cpe` ON cpe.entity_id = main_table.product_id
- INNER JOIN `catalog_product_option_title` AS `default_option_title`
- ON default_option_title.option_id = main_table.option_id
- LEFT JOIN `catalog_product_option_title` AS `store_option_title`
- ON store_option_title.option_id = main_table.option_id AND store_option_title.store_id = '1'
- LEFT JOIN `catalog_product_option_price` AS `default_option_price`
- ON default_option_price.option_id = main_table.option_id AND default_option_price.store_id = 0
- LEFT JOIN `catalog_product_option_price` AS `store_option_price`
- ON store_option_price.option_id = main_table.option_id AND store_option_price.store_id = '1'
- LEFT JOIN (SELECT option_id as magento_title_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', store_id, '",', '"title"', ':"', title, '"}')),
- ']') AS mageworx_option_title
- FROM catalog_product_option_title
- GROUP BY option_id) AS `mageworx_option_title`
- ON main_table.option_id = mageworx_option_title.magento_title_option_id
- LEFT JOIN (SELECT option_id as magento_price_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', store_id, '",', '"price_type"', ':"', price_type, '",',
- '"price"', ':"', price, '"}')), ']') AS mageworx_option_price
- FROM catalog_product_option_price
- GROUP BY option_id) AS `mageworx_option_price`
- ON main_table.option_id = mageworx_option_price.magento_price_option_id
- LEFT JOIN (SELECT `mageworx_option_dependency`.`child_option_id`,
- concat('[', group_concat(concat('["', parent_option_id, '","', parent_option_type_id, '"]')),
- ']') AS `dependency`
- FROM `mageworx_option_dependency`
- WHERE (child_option_type_id = '')
- GROUP BY `child_option_id`) AS `mageworx_option_dependency`
- ON mageworx_option_dependency.child_option_id = main_table.mageworx_option_id
- LEFT JOIN (SELECT mageworx_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', IFNULL(store_id, ''), '",', '"description"', ':"',
- IFNULL(description, ''), '"}')), ']') AS description
- FROM mageworx_optionfeatures_option_description
- GROUP BY mageworx_option_id) AS `option_description`
- ON main_table.mageworx_option_id = option_description.mageworx_option_id
- LEFT JOIN `mageworx_optionvisibility_option_customer_group` AS `option_customer_group`
- ON main_table.mageworx_option_id = option_customer_group.mageworx_option_id AND
- option_customer_group.customer_group_id = '0'
- LEFT JOIN `mageworx_optionvisibility_option_store_view` AS `option_store_view`
- ON main_table.mageworx_option_id = option_store_view.mageworx_option_id AND
- option_store_view.customer_store_id = '1'
- WHERE (default_option_title.store_id = 0)
- AND (`product_id` IN (1240))
- AND (`main_table`.`disabled` = '0')
- AND (`main_table`.`disabled_by_values` = '0')
- HAVING (visibility_by_customer_group_id)
- AND (visibility_by_customer_store_id);
- # Time: 2019-12-30T15:19:33.996841Z #
- # User@Host: engraved_live[engraved_live] @ localhost [] Id: 78120 #
- # Query_time: 1.460234 Lock_time: 0.001233 Rows_sent: 12 Rows_examined: 257991 #
- # SET timestamp = 1577719173; #
- SELECT `main_table`.*,
- `default_option_title`.`title` AS `default_title`,
- `store_option_title`.`title` AS `store_title`,
- IF(store_option_title.title IS NULL, default_option_title.title,
- store_option_title.title) AS `title`,
- `default_option_price`.`price` AS `default_price`,
- `default_option_price`.`price_type` AS `default_price_type`,
- `store_option_price`.`price` AS `store_price`,
- `store_option_price`.`price_type` AS `store_price_type`,
- IF(store_option_price.price IS NULL, default_option_price.price,
- store_option_price.price) AS `price`,
- IF(store_option_price.price_type IS NULL, default_option_price.price_type,
- store_option_price.price_type) AS `price_type`,
- `mageworx_option_title`.`mageworx_option_title`,
- `mageworx_option_price`.`mageworx_option_price`,
- `mageworx_option_dependency`.`dependency` AS `field_hidden_dependency`,
- `option_description`.`description`,
- IF(main_table.is_all_groups = 1, 1,
- IF(option_customer_group.customer_group_id IS NULL, 0, 1)) AS `visibility_by_customer_group_id`,
- IF(main_table.is_all_websites = 1, 1,
- IF(option_store_view.customer_store_id IS NULL, 0, 1)) AS `visibility_by_customer_store_id`
- FROM `catalog_product_option` AS `main_table`
- INNER JOIN `catalog_product_entity` AS `cpe` ON cpe.entity_id = main_table.product_id
- INNER JOIN `catalog_product_option_title` AS `default_option_title`
- ON default_option_title.option_id = main_table.option_id
- LEFT JOIN `catalog_product_option_title` AS `store_option_title`
- ON store_option_title.option_id = main_table.option_id AND store_option_title.store_id = '1'
- LEFT JOIN `catalog_product_option_price` AS `default_option_price`
- ON default_option_price.option_id = main_table.option_id AND default_option_price.store_id = 0
- LEFT JOIN `catalog_product_option_price` AS `store_option_price`
- ON store_option_price.option_id = main_table.option_id AND store_option_price.store_id = '1'
- LEFT JOIN (SELECT option_id as magento_title_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', store_id, '",', '"title"', ':"', title, '"}')),
- ']') AS mageworx_option_title
- FROM catalog_product_option_title
- GROUP BY option_id) AS `mageworx_option_title`
- ON main_table.option_id = mageworx_option_title.magento_title_option_id
- LEFT JOIN (SELECT option_id as magento_price_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', store_id, '",', '"price_type"', ':"', price_type, '",',
- '"price"', ':"', price, '"}')), ']') AS mageworx_option_price
- FROM catalog_product_option_price
- GROUP BY option_id) AS `mageworx_option_price`
- ON main_table.option_id = mageworx_option_price.magento_price_option_id
- LEFT JOIN (SELECT `mageworx_option_dependency`.`child_option_id`,
- concat('[', group_concat(concat('["', parent_option_id, '","', parent_option_type_id, '"]')),
- ']') AS `dependency`
- FROM `mageworx_option_dependency`
- WHERE (child_option_type_id = '')
- GROUP BY `child_option_id`) AS `mageworx_option_dependency`
- ON mageworx_option_dependency.child_option_id = main_table.mageworx_option_id
- LEFT JOIN (SELECT mageworx_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', IFNULL(store_id, ''), '",', '"description"', ':"',
- IFNULL(description, ''), '"}')), ']') AS description
- FROM mageworx_optionfeatures_option_description
- GROUP BY mageworx_option_id) AS `option_description`
- ON main_table.mageworx_option_id = option_description.mageworx_option_id
- LEFT JOIN `mageworx_optionvisibility_option_customer_group` AS `option_customer_group`
- ON main_table.mageworx_option_id = option_customer_group.mageworx_option_id AND
- option_customer_group.customer_group_id = '0'
- LEFT JOIN `mageworx_optionvisibility_option_store_view` AS `option_store_view`
- ON main_table.mageworx_option_id = option_store_view.mageworx_option_id AND
- option_store_view.customer_store_id = '1'
- WHERE (default_option_title.store_id = 0)
- AND (`product_id` IN (1240))
- AND (`main_table`.`disabled` = '0')
- AND (`main_table`.`disabled_by_values` = '0')
- HAVING (visibility_by_customer_group_id)
- AND (visibility_by_customer_store_id);
- # Time: 2019-12-30T15:19:36.470595Z #
- # User@Host: engraved_live[engraved_live] @ localhost [] Id: 78119 #
- # Query_time: 1.376730 Lock_time: 0.000393 Rows_sent: 12 Rows_examined: 257991 #
- # SET timestamp = 1577719176; #
- SELECT `main_table`.*,
- `default_option_title`.`title` AS `default_title`,
- `store_option_title`.`title` AS `store_title`,
- IF(store_option_title.title IS NULL, default_option_title.title,
- store_option_title.title) AS `title`,
- `default_option_price`.`price` AS `default_price`,
- `default_option_price`.`price_type` AS `default_price_type`,
- `store_option_price`.`price` AS `store_price`,
- `store_option_price`.`price_type` AS `store_price_type`,
- IF(store_option_price.price IS NULL, default_option_price.price,
- store_option_price.price) AS `price`,
- IF(store_option_price.price_type IS NULL, default_option_price.price_type,
- store_option_price.price_type) AS `price_type`,
- `mageworx_option_title`.`mageworx_option_title`,
- `mageworx_option_price`.`mageworx_option_price`,
- `mageworx_option_dependency`.`dependency` AS `field_hidden_dependency`,
- `option_description`.`description`,
- IF(main_table.is_all_groups = 1, 1,
- IF(option_customer_group.customer_group_id IS NULL, 0, 1)) AS `visibility_by_customer_group_id`,
- IF(main_table.is_all_websites = 1, 1,
- IF(option_store_view.customer_store_id IS NULL, 0, 1)) AS `visibility_by_customer_store_id`
- FROM `catalog_product_option` AS `main_table`
- INNER JOIN `catalog_product_entity` AS `cpe` ON cpe.entity_id = main_table.product_id
- INNER JOIN `catalog_product_option_title` AS `default_option_title`
- ON default_option_title.option_id = main_table.option_id
- LEFT JOIN `catalog_product_option_title` AS `store_option_title`
- ON store_option_title.option_id = main_table.option_id AND store_option_title.store_id = '1'
- LEFT JOIN `catalog_product_option_price` AS `default_option_price`
- ON default_option_price.option_id = main_table.option_id AND default_option_price.store_id = 0
- LEFT JOIN `catalog_product_option_price` AS `store_option_price`
- ON store_option_price.option_id = main_table.option_id AND store_option_price.store_id = '1'
- LEFT JOIN (SELECT option_id as magento_title_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', store_id, '",', '"title"', ':"', title, '"}')),
- ']') AS mageworx_option_title
- FROM catalog_product_option_title
- GROUP BY option_id) AS `mageworx_option_title`
- ON main_table.option_id = mageworx_option_title.magento_title_option_id
- LEFT JOIN (SELECT option_id as magento_price_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', store_id, '",', '"price_type"', ':"', price_type, '",',
- '"price"', ':"', price, '"}')), ']') AS mageworx_option_price
- FROM catalog_product_option_price
- GROUP BY option_id) AS `mageworx_option_price`
- ON main_table.option_id = mageworx_option_price.magento_price_option_id
- LEFT JOIN (SELECT `mageworx_option_dependency`.`child_option_id`,
- concat('[', group_concat(concat('["', parent_option_id, '","', parent_option_type_id, '"]')),
- ']') AS `dependency`
- FROM `mageworx_option_dependency`
- WHERE (child_option_type_id = '')
- GROUP BY `child_option_id`) AS `mageworx_option_dependency`
- ON mageworx_option_dependency.child_option_id = main_table.mageworx_option_id
- LEFT JOIN (SELECT mageworx_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', IFNULL(store_id, ''), '",', '"description"', ':"',
- IFNULL(description, ''), '"}')), ']') AS description
- FROM mageworx_optionfeatures_option_description
- GROUP BY mageworx_option_id) AS `option_description`
- ON main_table.mageworx_option_id = option_description.mageworx_option_id
- LEFT JOIN `mageworx_optionvisibility_option_customer_group` AS `option_customer_group`
- ON main_table.mageworx_option_id = option_customer_group.mageworx_option_id AND
- option_customer_group.customer_group_id = '0'
- LEFT JOIN `mageworx_optionvisibility_option_store_view` AS `option_store_view`
- ON main_table.mageworx_option_id = option_store_view.mageworx_option_id AND
- option_store_view.customer_store_id = '1'
- WHERE (default_option_title.store_id = 0)
- AND (`product_id` IN (1240))
- AND (`main_table`.`disabled` = '0')
- AND (`main_table`.`disabled_by_values` = '0')
- HAVING (visibility_by_customer_group_id)
- AND (visibility_by_customer_store_id);
- # Time: 2019-12-30T15:19:39.439174Z #
- # User@Host: engraved_live[engraved_live] @ localhost [] Id: 78121 #
- # Query_time: 1.367752 Lock_time: 0.000886 Rows_sent: 12 Rows_examined: 257991 #
- # SET timestamp = 1577719179; #
- SELECT `main_table`.*,
- `default_option_title`.`title` AS `default_title`,
- `store_option_title`.`title` AS `store_title`,
- IF(store_option_title.title IS NULL, default_option_title.title,
- store_option_title.title) AS `title`,
- `default_option_price`.`price` AS `default_price`,
- `default_option_price`.`price_type` AS `default_price_type`,
- `store_option_price`.`price` AS `store_price`,
- `store_option_price`.`price_type` AS `store_price_type`,
- IF(store_option_price.price IS NULL, default_option_price.price,
- store_option_price.price) AS `price`,
- IF(store_option_price.price_type IS NULL, default_option_price.price_type,
- store_option_price.price_type) AS `price_type`,
- `mageworx_option_title`.`mageworx_option_title`,
- `mageworx_option_price`.`mageworx_option_price`,
- `mageworx_option_dependency`.`dependency` AS `field_hidden_dependency`,
- `option_description`.`description`,
- IF(main_table.is_all_groups = 1, 1,
- IF(option_customer_group.customer_group_id IS NULL, 0, 1)) AS `visibility_by_customer_group_id`,
- IF(main_table.is_all_websites = 1, 1,
- IF(option_store_view.customer_store_id IS NULL, 0, 1)) AS `visibility_by_customer_store_id`
- FROM `catalog_product_option` AS `main_table`
- INNER JOIN `catalog_product_entity` AS `cpe` ON cpe.entity_id = main_table.product_id
- INNER JOIN `catalog_product_option_title` AS `default_option_title`
- ON default_option_title.option_id = main_table.option_id
- LEFT JOIN `catalog_product_option_title` AS `store_option_title`
- ON store_option_title.option_id = main_table.option_id AND store_option_title.store_id = '1'
- LEFT JOIN `catalog_product_option_price` AS `default_option_price`
- ON default_option_price.option_id = main_table.option_id AND default_option_price.store_id = 0
- LEFT JOIN `catalog_product_option_price` AS `store_option_price`
- ON store_option_price.option_id = main_table.option_id AND store_option_price.store_id = '1'
- LEFT JOIN (SELECT option_id as magento_title_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', store_id, '",', '"title"', ':"', title, '"}')),
- ']') AS mageworx_option_title
- FROM catalog_product_option_title
- GROUP BY option_id) AS `mageworx_option_title`
- ON main_table.option_id = mageworx_option_title.magento_title_option_id
- LEFT JOIN (SELECT option_id as magento_price_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', store_id, '",', '"price_type"', ':"', price_type, '",',
- '"price"', ':"', price, '"}')), ']') AS mageworx_option_price
- FROM catalog_product_option_price
- GROUP BY option_id) AS `mageworx_option_price`
- ON main_table.option_id = mageworx_option_price.magento_price_option_id
- LEFT JOIN (SELECT `mageworx_option_dependency`.`child_option_id`,
- concat('[', group_concat(concat('["', parent_option_id, '","', parent_option_type_id, '"]')),
- ']') AS `dependency`
- FROM `mageworx_option_dependency`
- WHERE (child_option_type_id = '')
- GROUP BY `child_option_id`) AS `mageworx_option_dependency`
- ON mageworx_option_dependency.child_option_id = main_table.mageworx_option_id
- LEFT JOIN (SELECT mageworx_option_id,
- CONCAT('[', GROUP_CONCAT(
- CONCAT('{"store_id"', ':"', IFNULL(store_id, ''), '",', '"description"', ':"',
- IFNULL(description, ''), '"}')), ']') AS description
- FROM mageworx_optionfeatures_option_description
- GROUP BY mageworx_option_id) AS `option_description`
- ON main_table.mageworx_option_id = option_description.mageworx_option_id
- LEFT JOIN `mageworx_optionvisibility_option_customer_group` AS `option_customer_group`
- ON main_table.mageworx_option_id = option_customer_group.mageworx_option_id AND
- option_customer_group.customer_group_id = '0'
- LEFT JOIN `mageworx_optionvisibility_option_store_view` AS `option_store_view`
- ON main_table.mageworx_option_id = option_store_view.mageworx_option_id AND
- option_store_view.customer_store_id = '1'
- WHERE (default_option_title.store_id = 0)
- AND (`product_id` IN (1240))
- AND (`main_table`.`disabled` = '0')
- AND (`main_table`.`disabled_by_values` = '0')
- HAVING (visibility_by_customer_group_id)
- AND (visibility_by_customer_store_id);
Advertisement
Add Comment
Please, Sign In to add comment