Slide 52
Slide 52 text
ϚςϏϡʔͷ࣮
CREATE MATERIALIZED VIEW view_feature_available_item AS
WITH target_item AS (
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