| 1 |
|
|---|
| 2 | #ÇåÀíÉŸ³ý׎̬µÄÉÌÆ·£¬ÒÔŒ°Æä¹ØÁªµÄ±í£¬×Ü14žö±í
|
|---|
| 3 | #ÔÀíÊÇÒÔÉÌÆ·ÊôÐÔ±í(ent_product_item)Ϊ±ê׌£¬ÏÈÉŸ³ýÆäÊýŸÝ£¬ÔÙ¹ØÁªÆäËû±íÇåÀí£š²»ŽæÔÚ¹ØÁª¹ØÏµµÄÆäËû±íÊýŸÝ»á±»ÇåÀí£©
|
|---|
| 4 | #²âÊÔÇåÀí14žö±íʱŒä>2Сʱ
|
|---|
| 5 |
|
|---|
| 6 | #1¡¢ÉÌÆ·ÊôÐÔ±í(ent_product_item)
|
|---|
| 7 | delete from ent_product_item where status=5 and last_update_date<sysdate-interval '30' day
|
|---|
| 8 |
|
|---|
| 9 | #2¡¢ÉÌÆ·Ö÷±í(ent_product)
|
|---|
| 10 | delete from ent_product t where not exists(select 1 from ent_product_item item where item.company_product_id=t.id)
|
|---|
| 11 |
|
|---|
| 12 | #3¡¢ÉÌÆ·ŒÆÊýÆ÷(ent_company_product_counter)
|
|---|
| 13 | delete from ent_company_product_counter t where not exists(select 1 from ent_product_item item where item.company_product_id=t.company_product_id)
|
|---|
| 14 |
|
|---|
| 15 | #4¡¢ÉÌÆ·ä¯ÀÀŒÇÂŒ(ent_last_view_product)
|
|---|
| 16 | delete from ent_last_view_product t where not exists(select 1 from ent_product_item item where item.company_product_id=t.product_id1)
|
|---|
| 17 | delete from ent_last_view_product t where not exists(select 1 from ent_product_item item where item.company_product_id=t.product_id)
|
|---|
| 18 |
|
|---|
| 19 | #5¡¢ÉÌÆ·ÏêÇé(ent_product_detail)
|
|---|
| 20 | delete from ent_product_detail t where not exists(select 1 from ent_product_item item where item.company_product_id=t.company_product_id)
|
|---|
| 21 |
|
|---|
| 22 | #6¡¢ÉÌÆ·ÄÚÈÝÉóºË(ent_product_content_audit)
|
|---|
| 23 | delete from ent_product_content_audit t where not exists(select 1 from ent_product_item item where item.company_product_id=t.company_product_id)
|
|---|
| 24 |
|
|---|
| 25 | #7¡¢ÉÌÆ·ÎïÁ÷·œÊœ(ent_product_logistics)
|
|---|
| 26 | delete from ent_product_logistics t where not exists(select 1 from ent_product_item item where item.company_product_id=t.company_product_id)
|
|---|
| 27 |
|
|---|
| 28 | #8¡¢ÉÌÆ·ÎïÁ÷·ÑÓÃ(ent_product_logistics_detail)
|
|---|
| 29 | delete from ent_product_logistics_detail t where not exists(select 1 from ent_product_item item where item.company_product_id=t.product_logistics_id)
|
|---|
| 30 |
|
|---|
| 31 | #9¡¢É̳ÇÁôÑÔ(ent_question)
|
|---|
| 32 | delete from ent_question t where not exists(select 1 from ent_product_item item where item.company_product_id=t.target_id and t.type=1)
|
|---|
| 33 |
|
|---|
| 34 | #10¡¢ÉÌŒÒÍÆŒöÉÌÆ·(ent_recommend_product)
|
|---|
| 35 | delete from ent_recommend_product t where not exists(select 1 from ent_product_item item where item.company_product_id=t.company_product_id)
|
|---|
| 36 |
|
|---|
| 37 | #11¡¢É̳ǟٱš(ent_report)
|
|---|
| 38 | delete from ent_report t where not exists(select 1 from ent_product_item item where item.company_product_id=t.target_id and t.target_type=1)
|
|---|
| 39 |
|
|---|
| 40 | #12¡¢×Ô¶šÒåÉÌÆ··ÖÀž(ent_shop_homepage_product)
|
|---|
| 41 | delete from ent_shop_homepage_product t where not exists(select 1 from ent_product_item item where item.company_product_id=t.company_product_id)
|
|---|
| 42 |
|
|---|
| 43 | #13¡¢×Ô¶šÒåÉÌÆ··ÖÀà(ent_self_product_type)
|
|---|
| 44 | delete from ent_self_product_type t where not exists(select 1 from ent_product_item item where item.company_product_id=t.company_product_id)
|
|---|
| 45 |
|
|---|
| 46 | #14¡¢œ»Ò×µã»÷ͳŒÆ(ent_trade_stat)
|
|---|
| 47 | delete from ent_trade_stat t where not exists(select 1 from ent_product_item item where item.company_product_id=t.company_product_id)
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|