magento前台一次页面要执行的sql语句

在关掉查询的情况下,执行sql语句如下:
SET SQL_MODE=''

SET NAMES utf8;

SHOW TABLE STATUS LIKE 'core_resource'

SELECT `core_resource`.* FROM `core_resource`

SELECT `index_process`.`indexer_code` FROM `index_process`

SELECT `core_website`.`website_id`, `core_website`.`code`, `core_website`.`name` FROM `core_website`

SELECT `core_store`.`store_id`, `core_store`.`code`, `core_store`.`name`, `core_store`.`website_id` FROM `core_store` ORDER BY `sort_order` ASC

SELECT `core_config_data`.`scope`, `core_config_data`.`scope_id`, `core_config_data`.`path`, `core_config_data`.`value` FROM `core_config_data`

SELECT `main_table`.* FROM `core_store` AS `main_table` ORDER BY CASE WHEN main_table.store_id = 0 THEN 0 ELSE 1 END ASC, main_table.sort_order ASC, main_table.name ASC

SELECT `main_table`.* FROM `core_website` AS `main_table` ORDER BY main_table.sort_order ASC, main_table.name ASC

SELECT `main_table`.* FROM `core_store_group` AS `main_table` ORDER BY main_table.name ASC

SELECT `core_url_rewrite`.* FROM `core_url_rewrite` WHERE (request_path IN ('', '/')) AND (store_id IN(0, 1))

SELECT `main_table`.* FROM `design_change` AS `main_table` WHERE (store_id = '1') AND (date_from <= '2014-11-26 02:41:26' or date_from IS NULL) AND (date_to >= '2014-11-26 02:41:26' or date_to IS NULL)

SELECT `core_translate`.`string`, `core_translate`.`translate` FROM `core_translate` WHERE (store_id IN (0 , '1')) AND (locale = 'en_US') ORDER BY `store_id` ASC

SELECT `eav_entity_type`.* FROM `eav_entity_type` WHERE (`eav_entity_type`.`entity_type_code`='catalog_product')

SELECT `catalog_product_entity`.`entity_id` FROM `catalog_product_entity` WHERE (sku = '0201000301')

SELECT `catalog_product_entity`.`entity_id` FROM `catalog_product_entity` WHERE (sku = '0213000201')

SELECT `catalog_product_entity`.`entity_id` FROM `catalog_product_entity` WHERE (sku = '0201000401')

SELECT `catalog_product_entity`.`entity_id` FROM `catalog_product_entity` WHERE (sku = '0201000201')

SELECT `cms_page`.* FROM `cms_page`\x0a INNER JOIN `cms_page_store` ON cms_page.page_id = cms_page_store.page_id WHERE (`cms_page`.`identifier`='home') AND (is_active = 1) AND (cms_page_store.store_id IN (0, 1)) ORDER BY `cms_page_store`.`store_id` DESC LIMIT 1

SELECT `cms_page_store`.`store_id` FROM `cms_page_store` WHERE (page_id = 2)

SELECT `layout_update`.`xml` FROM `core_layout_update` AS `layout_update`\x0a INNER JOIN `core_layout_link` AS `link` ON link.layout_update_id=layout_update.layout_update_id WHERE (link.store_id IN (0, '1')) AND (link.area = 'frontend') AND (link.package = 'oneplus2014') AND (link.theme = 'oneplus2014') AND (layout_update.handle = 'default') ORDER BY `layout_update`.`sort_order` ASC

SELECT `layout_update`.`xml` FROM `core_layout_update` AS `layout_update`\x0a INNER JOIN `core_layout_link` AS `link` ON link.layout_update_id=layout_update.layout_update_id WHERE (link.store_id IN (0, '1')) AND (link.area = 'frontend') AND (link.package = 'oneplus2014') AND (link.theme = 'oneplus2014') AND (layout_update.handle = 'cms_page') ORDER BY `layout_update`.`sort_order` ASC

SELECT `layout_update`.`xml` FROM `core_layout_update` AS `layout_update`\x0a INNER JOIN `core_layout_link` AS `link` ON link.layout_update_id=layout_update.layout_update_id WHERE (link.store_id IN (0, '1')) AND (link.area = 'frontend') AND (link.package = 'oneplus2014') AND (link.theme = 'oneplus2014') AND (layout_update.handle = 'STORE_us') ORDER BY `layout_update`.`sort_order` ASC

SELECT `layout_update`.`xml` FROM `core_layout_update` AS `layout_update`\x0a INNER JOIN `core_layout_link` AS `link` ON link.layout_update_id=layout_update.layout_update_id WHERE (link.store_id IN (0, '1')) AND (link.area = 'frontend') AND (link.package = 'oneplus2014') AND (link.theme = 'oneplus2014') AND (layout_update.handle = 'THEME_frontend_oneplus2014_oneplus2014') ORDER BY `layout_update`.`sort_order` ASC

SELECT `layout_update`.`xml` FROM `core_layout_update` AS `layout_update`\x0a INNER JOIN `core_layout_link` AS `link` ON link.layout_update_id=layout_update.layout_update_id WHERE (link.store_id IN (0, '1')) AND (link.area = 'frontend') AND (link.package = 'oneplus2014') AND (link.theme = 'oneplus2014') AND (layout_update.handle = 'cms_index_index') ORDER BY `layout_update`.`sort_order` ASC

SELECT `layout_update`.`xml` FROM `core_layout_update` AS `layout_update`\x0a INNER JOIN `core_layout_link` AS `link` ON link.layout_update_id=layout_update.layout_update_id WHERE (link.store_id IN (0, '1')) AND (link.area = 'frontend') AND (link.package = 'oneplus2014') AND (link.theme = 'oneplus2014') AND (layout_update.handle = 'page_one_column_containerless') ORDER BY `layout_update`.`sort_order` ASC

SELECT `layout_update`.`xml` FROM `core_layout_update` AS `layout_update`\x0a INNER JOIN `core_layout_link` AS `link` ON link.layout_update_id=layout_update.layout_update_id WHERE (link.store_id IN (0, '1')) AND (link.area = 'frontend') AND (link.package = 'oneplus2014') AND (link.theme = 'oneplus2014') AND (layout_update.handle = 'customer_logged_out') ORDER BY `layout_update`.`sort_order` ASC

SELECT `eav_entity_type`.* FROM `eav_entity_type` WHERE (`eav_entity_type`.`entity_type_code`='customer')

SELECT `main_table`.`entity_id` FROM `sales_flat_order` AS `main_table` WHERE (main_table.customer_id = '') AND (state = 'pending_payment')

SELECT `eav_entity_type`.* FROM `eav_entity_type` WHERE (`eav_entity_type`.`entity_type_code`='catalog_category')

SELECT `catalog_category_entity`.`entity_id` FROM `catalog_category_entity` WHERE (entity_id = '2')

SELECT `catalog_category_entity`.* FROM `catalog_category_entity` WHERE (`catalog_category_entity`.`entity_id` = '2')

SELECT `catalog_category_entity`.* FROM `catalog_category_entity` WHERE (`catalog_category_entity`.`path` LIKE '1/2/%') ORDER BY `catalog_category_entity`.`position` ASC

SELECT `main_table`.`attribute_id`, `main_table`.`entity_type_id`, `main_table`.`attribute_code`, `main_table`.`attribute_model`, `main_table`.`backend_model`, `main_table`.`backend_type`, `main_table`.`backend_table`, `main_table`.`frontend_input`, `main_table`.`source_model` FROM `eav_attribute` AS `main_table`\x0a INNER JOIN `catalog_eav_attribute` AS `additional_table` ON additional_table.attribute_id = main_table.attribute_id WHERE (main_table.entity_type_id=3) AND (attribute_code IN('name', 'url_key', 'is_active'))

SELECT `a`.`attribute_id`, `t`.* FROM `eav_attribute` AS `a`\x0a INNER JOIN `eav_entity_type` AS `t` ON a.entity_type_id = t.entity_type_id WHERE (entity_type_code = 'catalog_category') AND (attribute_code = 'is_active')

SELECT `d`.`entity_id` FROM `catalog_category_entity_int` AS `d`\x0a LEFT JOIN `catalog_category_entity_int` AS `c` ON c.attribute_id = '42' AND c.store_id = '1' AND c.entity_id = d.entity_id WHERE (d.attribute_id = '42') AND (d.store_id = '0') AND (d.entity_id IN (SELECT `e`.`entity_id` FROM `catalog_category_entity` AS `e` WHERE (`e`.`entity_type_id` = '3') AND (`e`.`entity_id` IN('4', '5')))) AND (IF(c.value_id > 0, c.value, d.value) = '0')

SELECT `e`.`entity_id` FROM `catalog_category_entity` AS `e` WHERE (`e`.`entity_type_id` = '3') AND (`e`.`entity_id` IN('4', '5'))

SELECT `eav_attribute`.* FROM `eav_attribute` WHERE (`eav_attribute`.`attribute_code`='include_in_menu') AND (entity_type_id = '3')

SELECT `eav_entity_type`.`additional_attribute_table` FROM `eav_entity_type` WHERE (entity_type_id = '3')

SELECT `catalog_eav_attribute`.* FROM `catalog_eav_attribute` WHERE (attribute_id = '67')

SELECT `e`.*, IF(at_is_active.value_id > 0, at_is_active.value, at_is_active_default.value) AS `is_active`, IF(at_include_in_menu.value_id > 0, at_include_in_menu.value, at_include_in_menu_default.value) AS `include_in_menu`, `core_url_rewrite`.`request_path` FROM `catalog_category_entity` AS `e`\x0a INNER JOIN `catalog_category_entity_int` AS `at_is_active_default` ON (`at_is_active_default`.`entity_id` = `e`.`entity_id`) AND (`at_is_active_default`.`attribute_id` = '42') AND `at_is_active_default`.`store_id` = 0\x0a LEFT JOIN `catalog_category_entity_int` AS `at_is_active` ON (`at_is_active`.`entity_id` = `e`.`entity_id`) AND (`at_is_active`.`attribute_id` = '42') AND (`at_is_active`.`store_id` = 1)\x0a INNER JOIN `catalog_category_entity_int` AS `at_include_in_menu_default` ON (`at_include_in_menu_default`.`entity_id` = `e`.`entity_id`) AND (`at_include_in_menu_default`.`attribute_id` = '67') AND `at_include_in_menu_default`.`store_id` = 0\x0a LEFT JOIN `catalog_category_entity_int` AS `at_include_in_menu` ON (`at_include_in_menu`.`entity_id` = `e`.`entity_id`) AND (`at_include_in_menu`.`attribute_id` = '67') AND (`at_include_in_menu`.`store_id` = 1)\x0a LEFT JOIN `core_url_rewrite` ON (core_url_rewrite.category_id=e.entity_id) AND (core_url_rewrite.is_system=1 AND core_url_rewrite.store_id='1' AND core_url_rewrite.id_path LIKE 'category/%') WHERE (`e`.`entity_type_id` = '3') AND (`e`.`entity_id` IN('4', '5')) AND (IF(at_is_active.value_id > 0, at_is_active.value, at_is_active_default.value) = '1') AND (IF(at_include_in_menu.value_id > 0, at_include_in_menu.value, at_include_in_menu_default.value) = '1')

SELECT `t_d`.`entity_id`, `t_d`.`attribute_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_category_entity_varchar` AS `t_d`\x0a LEFT JOIN `catalog_category_entity_varchar` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 1 WHERE (t_d.entity_type_id = 3) AND (t_d.entity_id IN (5)) AND (t_d.attribute_id IN ('41', '43')) AND (t_d.store_id = 0)

SELECT `catalog_category_entity`.* FROM `catalog_category_entity` WHERE (entity_id ='2')

SELECT `main_table`.*, `additional_table`.*, `entity_attribute`.*, IFNULL(al.value, main_table.frontend_label) AS `store_label` FROM `eav_attribute` AS `main_table`\x0a INNER JOIN `catalog_eav_attribute` AS `additional_table` ON additional_table.attribute_id = main_table.attribute_id\x0a INNER JOIN `eav_entity_attribute` AS `entity_attribute` ON entity_attribute.attribute_id = main_table.attribute_id\x0a LEFT JOIN `eav_attribute_label` AS `al` ON al.attribute_id = main_table.attribute_id AND al.store_id = 1 WHERE (main_table.entity_type_id=3) AND (entity_attribute.attribute_set_id = '3') ORDER BY sort_order ASC

SELECT `attr_table`.* FROM `catalog_category_entity_int` AS `attr_table`\x0a INNER JOIN `eav_entity_attribute` AS `set_table` ON attr_table.attribute_id = set_table.attribute_id AND set_table.attribute_set_id = '3' WHERE (attr_table.entity_id = '2') AND (attr_table.store_id IN (0, 1)) UNION ALL SELECT `attr_table`.* FROM `catalog_category_entity_varchar` AS `attr_table`\x0a INNER JOIN `eav_entity_attribute` AS `set_table` ON attr_table.attribute_id = set_table.attribute_id AND set_table.attribute_set_id = '3' WHERE (attr_table.entity_id = '2') AND (attr_table.store_id IN (0, 1)) UNION ALL SELECT `attr_table`.* FROM `catalog_category_entity_text` AS `attr_table`\x0a INNER JOIN `eav_entity_attribute` AS `set_table` ON attr_table.attribute_id = set_table.attribute_id AND set_table.attribute_set_id = '3' WHERE (attr_table.entity_id = '2') AND (attr_table.store_id IN (0, 1)) UNION ALL SELECT `attr_table`.* FROM `catalog_category_entity_datetime` AS `attr_table`\x0a INNER JOIN `eav_entity_attribute` AS `set_table` ON attr_table.attribute_id = set_table.attribute_id AND set_table.attribute_set_id = '3' WHERE (attr_table.entity_id = '2') AND (attr_table.store_id IN (0, 1)) UNION ALL SELECT `attr_table`.* FROM `catalog_category_entity_decimal` AS `attr_table`\x0a INNER JOIN `eav_entity_attribute` AS `set_table` ON attr_table.attribute_id = set_table.attribute_id AND set_table.attribute_set_id = '3' WHERE (attr_table.entity_id = '2') AND (attr_table.store_id IN (0, 1)) ORDER BY `store_id` ASC

posted @ 2015-06-20 23:03  szphper  阅读(213)  评论(0)    收藏  举报