| Aggregate (cost=219.75..219.76 rows=1 width=8) |
| -> Sort (cost=219.61..219.63 rows=9 width=505) |
| Sort Key: eip.created_at DESC |
| -> Group (cost=219.42..219.47 rows=9 width=505) |
| Group Key: eip.id |
| -> Sort (cost=219.42..219.45 rows=9 width=12) |
| Sort Key: eip.id |
| -> Hash Left Join (cost=172.62..219.28 rows=9 width=12) |
| Hash Cond: (eip.erp_inventory_overflow_id = eios.id) |
| Filter: ((lower((p.name)::text) ~~* '%mk-mc300%'::text) OR (p.pinyin_shortcut ~~* '%mk-mc300%'::text) OR (lower((pt.name)::text) ~~* '%mk-mc300%'::text) OR (lower((pb.name)::text) ~~* '%mk-mc300%'::text) OR (lower((ps.name)::text) ~~* '%mk-mc300%'::text) OR (lower((pc.name)::text) ~~* '%mk-mc300%'::text) OR (lower(p.description) ~~* '%mk-mc300%'::text) OR (lower((epis.serial_no)::text) ~~* '%mk-mc300%'::text) OR (lower((eiss.serial_no)::text) ~~* '%mk-mc300%'::text) OR (lower((eids.serial_no)::text) ~~* '%mk-mc300%'::text) OR (lower((eibs.serial_no)::text) ~~* '%mk-mc300%'::text) OR (lower((epgs.serial_no)::text) ~~* '%mk-mc300%'::text) OR (lower((eios.serial_no)::text) ~~* '%mk-mc300%'::text)) |
| -> Hash Left Join (cost=136.79..181.21 rows=73 width=273) |
| Hash Cond: (eip.erp_purchase_gift_id = epgs.id) |
| -> Hash Left Join (cost=135.30..179.53 rows=73 width=258) |
| Hash Cond: (eip.erp_inventory_disassemble_id = eids.id) |
| -> Hash Left Join (cost=134.18..178.22 rows=73 width=243) |
| Hash Cond: (eip.erp_inventory_build_id = eibs.id) |
| -> Hash Left Join (cost=132.91..176.76 rows=73 width=228) |
| Hash Cond: (eip.erp_inventory_start_id = eiss.id) |
| -> Hash Left Join (cost=131.19..174.85 rows=73 width=212) |
| Hash Cond: (epis.id = epips.erp_purchase_inbound_id) |
| -> Hash Left Join (cost=124.85..167.49 rows=73 width=216) |
| Hash Cond: (eip.erp_purchase_inbound_id = epis.id) |
| -> Hash Left Join (cost=114.94..157.40 rows=73 width=195) |
| Hash Cond: (p.product_component = pc.id) |
| -> Nested Loop Left Join (cost=109.34..151.60 rows=73 width=183) |
| -> Hash Left Join (cost=109.07..125.53 rows=73 width=158) |
| Hash Cond: (p.product_type = pt.id) |
| -> Hash Left Join (cost=106.65..122.91 rows=73 width=150) |
| Hash Cond: (p.product_brand = pb.id) |
| -> Hash Left Join (cost=98.75..114.81 rows=73 width=146) |
| Hash Cond: (eip.product_id = p.id) |
| -> Seq Scan on tbl_erp_inventory_products eip (cost=0.00..15.88 rows=73 width=40) |
| Filter: ((NOT is_build) AND (inventory > '0'::numeric)) |
| -> Hash (cost=72.22..72.22 rows=2122 width=114) |
| -> Seq Scan on tbl_products p (cost=0.00..72.22 rows=2122 width=114) |
| -> Hash (cost=5.18..5.18 rows=218 width=12) |
| -> Seq Scan on tbl_product_brands pb (cost=0.00..5.18 rows=218 width=12) |
| -> Hash (cost=1.63..1.63 rows=63 width=16) |
| -> Seq Scan on tbl_product_types pt (cost=0.00..1.63 rows=63 width=16) |
| -> Index Scan using tbl_product_series_pkey on tbl_product_series ps (cost=0.28..0.36 rows=1 width=33) |
| Index Cond: (p.product_serie = id) |
| -> Hash (cost=3.60..3.60 rows=160 width=20) |
| -> Seq Scan on tbl_product_components pc (cost=0.00..3.60 rows=160 width=20) |
| -> Hash (cost=7.18..7.18 rows=218 width=25) |
| -> Seq Scan on tbl_erp_purchase_inbounds epis (cost=0.00..7.18 rows=218 width=25) |
| -> Hash (cost=3.93..3.93 rows=193 width=4) |
| -> Seq Scan on tbl_erp_purchase_inbound_projects epips (cost=0.00..3.93 rows=193 width=4) |
| -> Hash (cost=1.32..1.32 rows=32 width=24) |
| -> Seq Scan on tbl_erp_inventory_starts eiss (cost=0.00..1.32 rows=32 width=24) |
| -> Hash (cost=1.12..1.12 rows=12 width=23) |
| -> Seq Scan on tbl_erp_inventory_builds eibs (cost=0.00..1.12 rows=12 width=23) |
| -> Hash (cost=1.05..1.05 rows=5 width=23) |
| -> Seq Scan on tbl_erp_inventory_disassembles eids (cost=0.00..1.05 rows=5 width=23) |
| -> Hash (cost=1.22..1.22 rows=22 width=23) |
| -> Seq Scan on tbl_erp_purchase_gifts epgs (cost=0.00..1.22 rows=22 width=23) |
| -> Hash (cost=34.68..34.68 rows=92 width=23) |
| -> Hash Right Join (cost=1.23..34.68 rows=92 width=23) |
| Hash Cond: (eiops.erp_inventory_overflow_id = eios.id) |
| -> Seq Scan on tbl_erp_inventory_overflow_projects eiops (cost=0.00..28.50 rows=1850 width=4) |
| -> Hash (cost=1.10..1.10 rows=10 width=23) |
| -> Seq Scan on tbl_erp_inventory_overflows eios (cost=0.00..1.10 rows=10 width=23) |