欢迎各位兄弟 发布技术文章
这里的技术是共享的
SELECT
pproductpr0_.p_product_prop_id AS col_0_0_,
pproductpr0_.p_product_prop_code AS col_1_0_,
pproductpr0_.p_product_prop_name AS col_2_0_,
CASE WHEN pproductpr0_.p_product_prop_val IS NULL THEN '' ELSE pproductpr0_.p_product_prop_val END AS col_3_0_,
pproductpr0_.p_product_prop_order AS col_4_0_,
(SELECT
bdic4_.b_dic_code
FROM b_dic bdic4_
WHERE bdic4_.b_dic_id = pproductpr0_.p_product_prop_must) AS col_5_0_,
pproductpr0_.p_product_prop_status AS col_6_0_,
(SELECT
bdic5_.b_dic_code
FROM b_dic bdic5_
WHERE bdic5_.b_dic_id = pproductpr0_.p_product_prop_display) AS col_7_0_,
pproductpr0_.p_product_prop_source AS col_8_0_,
pproductpr0_.p_product_prop_int_code AS col_9_0_,
pproduct3_.p_product_id AS col_10_0_,
pproductpr0_.p_product_prop_default_value AS col_11_0_,
(SELECT
bdic6_.b_dic_code
FROM b_dic bdic6_
WHERE bdic6_.b_dic_id = pproductpr0_.p_product_prop_available) AS col_12_0_,
(SELECT
bdic7_.b_dic_code
FROM b_dic bdic7_
WHERE bdic7_.b_dic_id = pproductpr0_.p_product_prop_width) AS col_13_0_,
(SELECT
bdic8_.b_dic_code
FROM b_dic bdic8_
WHERE bdic8_.b_dic_id = pproductpr0_.p_product_prop_valid_type) AS col_14_0_,
pproductty2_.p_ptp_classify_id AS col_15_0_,
pproductty1_.p_ptype_prop_id AS col_16_0_,
(SELECT
bdic9_.b_dic_code
FROM b_dic bdic9_
WHERE bdic9_.b_dic_id = pproductpr0_.p_product_prop_source_type) AS col_17_0_,
pproductpr0_.p_product_display_format AS col_18_0_,
pproductpr0_.p_product_value_field AS col_19_0_,
pproductpr0_.p_product_text_field AS col_20_0_,
pproductpr0_.p_product_min_length AS col_21_0_,
pproductpr0_.p_product_max_length AS col_22_0_,
pproductpr0_.p_product_event_source AS col_23_0_,
pproductpr0_.p_product_prop_prop_name AS col_24_0_,
pproductpr0_.p_product_prop_create_on AS col_25_0_,
pproductpr0_.p_product_prop_create_by AS col_26_0_,
pproductpr0_.p_product_prop_update_on AS col_27_0_,
pproductpr0_.p_product_prop_update_by AS col_28_0_
FROM p_product_prop pproductpr0_
LEFT OUTER JOIN p_product_type_prop pproductty1_
ON pproductpr0_.p_ptype_prop_id = pproductty1_.p_ptype_prop_id
LEFT OUTER JOIN p_product_type_prop_classify pproductty2_
ON pproductty1_.p_ptp_classify_id = pproductty2_.p_ptp_classify_id
LEFT OUTER JOIN p_product pproduct3_
ON pproductpr0_.p_product_id = pproduct3_.p_product_id
WHERE pproductpr0_.p_product_id = 'C07C25F3621A4B509E9DCE111812B7BA'
AND EXISTS(
SELECT pproductty2_.p_ptp_classify_id
FROM p_product_type_prop_classify pproductty2_
WHERE pproductty1_.p_ptp_classify_id = pproductty2_.p_ptp_classify_id
AND pproductty2_.p_ptp_classify_id = '8a8a94e55162a9db015162b123470065')
ORDER BY pproductty1_.p_ptype_prop_order;
p_product_prop经过pproductpr0_.p_product_id = 'C07C25F3621A4B509E9DCE111812B7BA'
过滤之后就是个小的结果集