explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bXnK

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 6,549.636 ↓ 0.0 0 1

Merge Right Join (cost=536,300.37..557,207.08 rows=1 width=233) (actual time=6,549.636..6,549.636 rows=0 loops=1)

  • Merge Cond: ((t1.area = tb_ws_trade_first_review_1.area) AND (t1.platid = tb_ws_trade_first_review_1.platid) AND (t1.partitionid = tb_ws_trade_first_review_1.partitionid) AND (t1.p_vopenid = tb_ws_trade_first_review_1.p_vopenid) AND (t1.p_vroleid = tb_ws_trade_first_review_1.p_vroleid))
2. 0.003 6,499.457 ↑ 2,561.0 1 1

Subquery Scan on t1 (cost=224,232.25..244,720.89 rows=2,561 width=97) (actual time=6,499.457..6,499.457 rows=1 loops=1)

  • Filter: (t1.fv IS NULL)
3. 0.022 6,499.454 ↑ 512,216.0 1 1

WindowAgg (cost=224,232.25..239,598.73 rows=512,216 width=117) (actual time=6,499.454..6,499.454 rows=1 loops=1)

4. 4,406.699 6,499.432 ↑ 256,108.0 2 1

Sort (cost=224,232.25..225,512.79 rows=512,216 width=117) (actual time=6,499.429..6,499.432 rows=2 loops=1)

  • Sort Key: tb_ws_trade_first_review.area, tb_ws_trade_first_review.platid, tb_ws_trade_first_review.partitionid, tb_ws_trade_first_review.p_vopenid, tb_ws_trade_first_review.p_vroleid, tb_ws_trade_first_review.trade_time DESC
  • Sort Method: external merge Disk: 65104kB
5. 2,092.733 2,092.733 ↑ 1.0 512,082 1

Seq Scan on tb_ws_trade_first_review (cost=0.00..175,657.80 rows=512,216 width=117) (actual time=0.026..2,092.733 rows=512,082 loops=1)

  • Filter: ((trade_time > '2019-10-09 15:15:44'::text) AND (review_stat = ANY ('{1,2}'::bigint[])) AND (game_id = 1))
  • Rows Removed by Filter: 2265716
6. 0.002 50.175 ↓ 0.0 0 1

Materialize (cost=312,068.12..312,454.11 rows=1 width=209) (actual time=50.175..50.175 rows=0 loops=1)

7. 0.001 50.173 ↓ 0.0 0 1

Nested Loop Left Join (cost=312,068.12..312,454.11 rows=1 width=209) (actual time=50.173..50.173 rows=0 loops=1)

  • Join Filter: ((tb_ws_trade_first_review_1.area = tb_ws_trade_first_review_4.area) AND (tb_ws_trade_first_review_1.platid = tb_ws_trade_first_review_4.platid) AND (tb_ws_trade_first_review_1.partitionid = tb_ws_trade_first_review_4.partitionid) AND (tb_ws_trade_first_review_1.p_vopenid = tb_ws_trade_first_review_4.p_vopenid) AND (tb_ws_trade_first_review_1.p_vroleid = tb_ws_trade_first_review_4.p_vroleid))
8. 0.002 50.172 ↓ 0.0 0 1

Merge Left Join (cost=188,578.97..188,579.32 rows=1 width=169) (actual time=50.172..50.172 rows=0 loops=1)

  • Merge Cond: ((tb_ws_trade_first_review_1.area = t3.area) AND (tb_ws_trade_first_review_1.platid = t3.platid) AND (tb_ws_trade_first_review_1.partitionid = t3.partitionid) AND (tb_ws_trade_first_review_1.p_vopenid = t3.p_vopenid) AND (tb_ws_trade_first_review_1.p_vroleid = t3.p_vroleid))
9. 0.019 50.170 ↓ 0.0 0 1

Sort (cost=187,866.17..187,866.17 rows=1 width=129) (actual time=50.170..50.170 rows=0 loops=1)

  • Sort Key: tb_ws_trade_first_review_1.area, tb_ws_trade_first_review_1.platid, tb_ws_trade_first_review_1.partitionid, tb_ws_trade_first_review_1.p_vopenid, tb_ws_trade_first_review_1.p_vroleid
  • Sort Method: quicksort Memory: 25kB
10. 0.014 50.151 ↓ 0.0 0 1

Hash Join (cost=185,753.24..187,866.16 rows=1 width=129) (actual time=50.151..50.151 rows=0 loops=1)

  • Hash Cond: ((tb_ws_trade_first_review_1.area = t0.area) AND (tb_ws_trade_first_review_1.platid = t0.platid) AND (tb_ws_trade_first_review_1.partitionid = t0.partitionid) AND (tb_ws_trade_first_review_1.p_vopenid = t0.p_vopenid) AND (tb_ws_trade_first_review_1.p_vroleid = t0.p_vroleid))
11. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=184,621.58..185,261.86 rows=51,222 width=81) (never executed)

  • Group Key: tb_ws_trade_first_review_1.area, tb_ws_trade_first_review_1.platid, tb_ws_trade_first_review_1.partitionid, tb_ws_trade_first_review_1.p_vopenid, tb_ws_trade_first_review_1.p_vroleid
12. 0.000 0.000 ↓ 0.0 0

Seq Scan on tb_ws_trade_first_review tb_ws_trade_first_review_1 (cost=0.00..175,657.80 rows=512,216 width=81) (never executed)

  • Filter: ((trade_time > '2019-10-09 15:15:44'::text) AND (review_stat = ANY ('{1,2}'::bigint[])) AND (game_id = 1))
13. 0.000 50.137 ↓ 0.0 0 1

Hash (cost=1,131.63..1,131.63 rows=1 width=89) (actual time=50.137..50.137 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
14. 0.001 50.137 ↓ 0.0 0 1

Subquery Scan on t0 (cost=1,131.61..1,131.63 rows=1 width=89) (actual time=50.137..50.137 rows=0 loops=1)

15. 0.003 50.136 ↓ 0.0 0 1

HashAggregate (cost=1,131.61..1,131.62 rows=1 width=89) (actual time=50.136..50.136 rows=0 loops=1)

  • Group Key: tb_ws_trade_first_review_2.area, tb_ws_trade_first_review_2.platid, tb_ws_trade_first_review_2.partitionid, tb_ws_trade_first_review_2.p_vopenid, tb_ws_trade_first_review_2.p_vroleid, tb_ws_trade_first_review_2.p_person
16. 0.006 50.133 ↓ 0.0 0 1

Bitmap Heap Scan on tb_ws_trade_first_review tb_ws_trade_first_review_2 (cost=17.02..1,131.59 rows=1 width=89) (actual time=50.133..50.133 rows=0 loops=1)

  • Recheck Cond: (first_review_id = '1573197336211_gkkwang'::text)
  • Filter: (review_stat = 1)
  • Heap Blocks: exact=1
17. 50.127 50.127 ↑ 82.2 4 1

Bitmap Index Scan on index_first_review_id (cost=0.00..17.02 rows=329 width=0) (actual time=50.127..50.127 rows=4 loops=1)

  • Index Cond: (first_review_id = '1573197336211_gkkwang'::text)
18. 0.000 0.000 ↓ 0.0 0

Sort (cost=712.81..712.86 rows=21 width=113) (never executed)

  • Sort Key: t3.area, t3.platid, t3.partitionid, t3.p_vopenid, t3.p_vroleid
19. 0.000 0.000 ↓ 0.0 0

Subquery Scan on t3 (cost=711.87..712.35 rows=21 width=113) (never executed)

20. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=711.87..712.14 rows=21 width=81) (never executed)

  • Group Key: tb_ws_trade_first_review_3.area, tb_ws_trade_first_review_3.platid, tb_ws_trade_first_review_3.partitionid, tb_ws_trade_first_review_3.p_vopenid, tb_ws_trade_first_review_3.p_vroleid
21. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on tb_ws_trade_first_review tb_ws_trade_first_review_3 (cost=24.71..708.37 rows=200 width=81) (never executed)

  • Recheck Cond: ((trade_time > '2019-11-07 15:15:44'::text) AND (game_id = 1))
  • Filter: (review_stat = ANY ('{1,2}'::bigint[]))
22. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_trade_first_review_trade_time (cost=0.00..24.66 rows=200 width=0) (never executed)

  • Index Cond: ((trade_time > '2019-11-07 15:15:44'::text) AND (game_id = 1))
23. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=123,489.14..123,596.27 rows=8,570 width=81) (never executed)

  • Group Key: tb_ws_trade_first_review_4.area, tb_ws_trade_first_review_4.platid, tb_ws_trade_first_review_4.partitionid, tb_ws_trade_first_review_4.p_vopenid, tb_ws_trade_first_review_4.p_vroleid
24. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on tb_ws_trade_first_review tb_ws_trade_first_review_4 (cost=10,005.18..121,989.41 rows=85,699 width=81) (never executed)

  • Recheck Cond: ((trade_time > '2019-11-01 15:15:44'::text) AND (game_id = 1))
  • Filter: (review_stat = ANY ('{1,2}'::bigint[]))
25. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_trade_first_review_trade_time (cost=0.00..9,983.76 rows=85,699 width=0) (never executed)

  • Index Cond: ((trade_time > '2019-11-01 15:15:44'::text) AND (game_id = 1))