explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0AKI

Settings
# exclusive inclusive rows x rows loops node
1. 0.188 2,080.317 ↑ 50.0 1 1

GroupAggregate (cost=30,679.70..30,744.37 rows=50 width=870) (actual time=2,080.317..2,080.317 rows=1 loops=1)

  • Group Key: shipper.name, shipper.code, shipper.nick, t0.id
2. 0.013 2,080.129 ↑ 2,238.0 1 1

Sort (cost=30,679.70..30,685.30 rows=2,238 width=802) (actual time=2,080.129..2,080.129 rows=1 loops=1)

  • Sort Key: shipper.name, shipper.code, shipper.nick, t0.id
  • Sort Method: quicksort Memory: 26kB
3. 147.391 2,080.116 ↑ 2,238.0 1 1

Hash Right Join (cost=2,742.91..30,555.18 rows=2,238 width=802) (actual time=1,859.051..2,080.116 rows=1 loops=1)

  • Hash Cond: (pl_pps.proposal_id = pps.id)
  • Filter: (((t0.content ->> 'object_type'::text) <> 'proposal'::text) OR (pl_pps.customer_id = 21416) OR ((t0.content ->> 'no_detail'::text) = 'true'::text))
  • Rows Removed by Filter: 1
4. 135.915 430.059 ↑ 1.0 1,161,630 1

Append (cost=0.00..23,245.92 rows=1,204,193 width=8) (actual time=0.009..430.059 rows=1,161,630 loops=1)

5. 0.005 0.005 ↓ 0.0 0 1

Seq Scan on proposal_publish pl_pps (cost=0.00..0.00 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=1)

6. 0.006 0.006 ↑ 1.0 16 1

Seq Scan on proposal_publish pl_pps_1 (cost=0.00..1.16 rows=16 width=8) (actual time=0.004..0.006 rows=16 loops=1)

7. 294.133 294.133 ↑ 1.0 1,161,614 1

Seq Scan on proposal_publish pl_pps_2 (cost=0.00..23,244.76 rows=1,204,176 width=8) (actual time=0.054..294.133 rows=1,161,614 loops=1)

8. 0.005 1,502.666 ↑ 7.0 1 1

Hash (cost=2,742.82..2,742.82 rows=7 width=806) (actual time=1,502.666..1,502.666 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 1,345.317 1,502.661 ↑ 7.0 1 1

Nested Loop Left Join (cost=0.00..2,742.82 rows=7 width=806) (actual time=113.565..1,502.661 rows=1 loops=1)

  • Join Filter: (((pps.active = 1) AND ((t0.content ->> 'object_type'::text) = 'proposal'::text) AND ((t0.content ->> 'proposal_ikkatsu_id'::text) IS NULL) AND (((t0.content ->> 'object_id'::text))::integer = pps.id)) OR (((t0.content ->> 'proposal_ikkatsu_id'::text) IS NOT NULL) AND (((t0.content ->> 'proposal_ikkatsu_id'::text))::integer = pps.ikkatsu_id)))
  • Rows Removed by Join Filter: 591208
  • Filter: ((((t0.content ->> 'object_type'::text) <> 'proposal'::text) OR (pps.auction_date >= '2019-04-28'::date)) AND (((t0.content ->> 'object_type'::text) <> 'proposal'::text) OR (to_char((pps.auction_date)::timestamp with time zone, 'yyyy-mm-dd'::text) <= '2019-04-28'::text)))
  • Rows Removed by Filter: 271
10. 5.538 35.359 ↓ 155.0 155 1

Nested Loop Left Join (cost=0.00..2,233.16 rows=1 width=798) (actual time=0.239..35.359 rows=155 loops=1)

  • Join Filter: (((t0.content ->> 'shipper_id'::text))::integer = shipper.id)
  • Rows Removed by Join Filter: 4283
11. 28.426 28.426 ↓ 155.0 155 1

Seq Scan on timeline t0 (cost=0.00..2,227.66 rows=1 width=718) (actual time=0.204..28.426 rows=155 loops=1)

  • Filter: ((destination IS NOT NULL) AND ((content ->> 'object_id'::text) IS NOT NULL) AND ((content ->> 'object_type'::text) IS NOT NULL) AND (active = 1) AND (status = 1) AND ((content ->> 'object_type'::text) = 'proposal'::text) AND (((content ->> 'object_type'::text) = 'proposal'::text) OR (created_at >= '2019-04-28 00:00:00'::timestamp without time zone)) AND (((content ->> 'object_type'::text) = 'proposal'::text) OR (to_char(created_at, 'yyyy-mm-dd'::text) <= '2019-04-28'::text)) AND timeline_match_val(destination, '{buyer,ids}'::text[], '21416'::text, 'contain'::text, 'no'::text) AND timeline_match_val(destination, '{buyer,is_admin}'::text[], 'true'::text, 'equal'::text, 'yes'::text) AND timeline_match_val(destination, '{buyer,region_ids}'::text[], '"013"'::text, 'contain'::text, 'yes'::text) AND timeline_match_val(destination, '{buyer,nojoin}'::text[], 'false'::text, 'equal'::text, 'yes'::text))
  • Rows Removed by Filter: 1743
12. 1.395 1.395 ↑ 1.7 29 155

Seq Scan on ninushi shipper (cost=0.00..4.50 rows=50 width=84) (actual time=0.003..0.009 rows=29 loops=155)

13. 121.985 121.985 ↓ 1.0 3,816 155

Seq Scan on proposal pps (cost=0.00..275.47 rows=3,747 width=14) (actual time=0.003..0.787 rows=3,816 loops=155)

Planning time : 0.720 ms
Execution time : 2,080.417 ms