'2019-01-01' AND '2019-12-31' AND gender = 1 AND age BETWEEN 20 AND 29; ্هΛ male_sales_twenty_2019 ͱ͍͏Viewͱͯ͠ఆٛ͢ΔࣄͰ SELECT * FROM male_sales_twenty_2019; ͜ͷΑ͏ʹγϯϓϧͳSQLͱͯ͠ද͢ࣄ͕Ͱ͖Δɻ 44
SELECT * FROM available_item INNER JOIN item_detail ON available_item.item_id = item_detail.item_id WHERE ( available_item.item_name LIKE '%PostgreSQL%' OR item_detail.article LIKE '%PostgreSQL%' OR item_detail.requirement_text LIKE '%PostgreSQL%' ); ※ available_item ɿ ར༻ՄೳͳϦετ ※ item_detail : ͷৄࡉใ 49
Cond: (available_item.item_id = item_detail.item_id) Join Filter: ( ((available_item.title)::text ~~ '%PostgreSQL%'::text) OR (item_detail.article ~~ '%PostgreSQL%'::text) OR ((item_detail.requirement_man_text)::text ~~ '%PostgreSQL%'::text) ) Rows Removed by Join Filter: 121547 -> Index Scan using available_item_item_id_key on available_item -> Index Scan using item_detail_item_id_key on item_detail Planning time: 13.394 ms Execution time: 6635.537 ms 50
SELECT available_item.item_id, available_item.title, item_detail.requirement_text, item_detail.article FROM available_item INNER JOIN item_detail ON available_item.item_id = item_detail.item_id ) SELECT target_item.item_id , feature.id AS feature_id FROM feature INNER JOIN target_item ON ( target_item.title LIKE CONCAT('%', display_condition_query ,'%') OR target_item.requirement_text LIKE CONCAT('%', display_condition_query ,'%') OR target_item.article LIKE CONCAT('%', display_condition_query ,'%') ); CREATE INDEX view_feature_available_item_item_id_key ON view_feature_available_item (item_id); CREATE INDEX view_feature_available_item_feature_id_key ON view_feature_available_item (feature_id) 52