explain.depesz.com

PostgreSQL's explain analyze made readable

Result: u7bd

Settings
# exclusive inclusive rows x rows loops node
1. 10,681.929 11,608.041 ↓ 0.0 0 1

Insert on rtsepezocoav_p_452_119064 citus_table_alias (cost=18,647.22..18,647.31 rows=2 width=68) (actual time=11,608.022..11,608.041 rows=0 loops=1)

2. 20.594 926.112 ↓ 48,364.5 96,729 1

Subquery Scan on *SELECT* (cost=18,647.22..18,647.31 rows=2 width=68) (actual time=792.157..926.112 rows=96,729 loops=1)

3. 103.379 905.518 ↓ 48,364.5 96,729 1

WindowAgg (cost=18,647.22..18,647.29 rows=2 width=24) (actual time=792.155..905.518 rows=96,729 loops=1)

4. 26.912 802.139 ↓ 48,364.5 96,729 1

Sort (cost=18,647.22..18,647.23 rows=2 width=36) (actual time=792.063..802.139 rows=96,729 loops=1)

  • Sort Key: c.zoneid
  • Sort Method: quicksort Memory: 10,629kB
5. 12.473 775.227 ↓ 48,364.5 96,729 1

Hash Join (cost=18,574.04..18,647.21 rows=2 width=36) (actual time=762.675..775.227 rows=96,729 loops=1)

  • Hash Cond: (z.zo_id = c.zoneid)
6. 0.086 0.148 ↑ 1.7 453 1

Bitmap Heap Scan on calc_zones_115744 z (cost=24.02..94.34 rows=755 width=20) (actual time=0.071..0.148 rows=453 loops=1)

  • Recheck Cond: ((pe_id = 391) AND (se_id = 12))
  • Heap Blocks: exact=11
7. 0.062 0.062 ↑ 1.7 453 1

Bitmap Index Scan on idx_calc_zones_sepe_115744 (cost=0.00..23.83 rows=755 width=0) (actual time=0.062..0.062 rows=453 loops=1)

  • Index Cond: ((pe_id = 391) AND (se_id = 12))
8. 13.012 762.606 ↓ 96,729.0 96,729 1

Hash (cost=18,550.01..18,550.01 rows=1 width=20) (actual time=762.590..762.606 rows=96,729 loops=1)

  • Buckets: 131,072 (originally 1024) Batches: 1 (originally 1) Memory Usage: 5,937kB
9. 23.003 749.594 ↓ 96,729.0 96,729 1

Subquery Scan on c (cost=18,548.60..18,550.01 rows=1 width=20) (actual time=654.349..749.594 rows=96,729 loops=1)

  • Filter: ((worker_hash(c.zoneid) >= 1,342,177,267) AND (worker_hash(c.zoneid) <= 1,431,655,751))
10. 67.898 726.591 ↓ 5,689.9 96,729 1

WindowAgg (cost=18,548.60..18,549.67 rows=17 width=28) (actual time=654.344..726.591 rows=96,729 loops=1)

11. 26.492 658.693 ↓ 5,689.9 96,729 1

Sort (cost=18,548.60..18,548.65 rows=17 width=44) (actual time=654.332..658.693 rows=96,729 loops=1)

  • Sort Key: f.ownerid, f.zoneid
  • Sort Method: quicksort Memory: 10,629kB
12. 13.274 632.201 ↓ 5,689.9 96,729 1

Subquery Scan on f (cost=15,808.96..18,548.26 rows=17 width=44) (actual time=312.896..632.201 rows=96,729 loops=1)

  • Filter: (f.ownerid = f.to_owner)
13. 121.450 618.927 ↓ 28.8 96,729 1

WindowAgg (cost=15,808.96..18,506.24 rows=3,361 width=48) (actual time=312.895..618.927 rows=96,729 loops=1)

14. 16.059 497.477 ↓ 28.8 96,729 1

Subquery Scan on v (cost=15,808.96..18,304.58 rows=3,361 width=56) (actual time=312.883..497.477 rows=96,729 loops=1)

  • Filter: ((v.r <= '10'::double precision) OR (v.nd_attraction > '1e-05'::double precision))
  • Rows Removed by Filter: 254
15. 156.175 481.418 ↓ 16.0 96,983 1

WindowAgg (cost=15,808.96..18,213.83 rows=6,050 width=56) (actual time=312.881..481.418 rows=96,983 loops=1)

16. 325.243 325.243 ↓ 16.0 96,983 1

Sort (cost=15,808.96..15,824.08 rows=6,050 width=200) (actual time=312.860..325.243 rows=96,983 loops=1)

  • Sort Key: ic.br2_id, x.zo_id, ((((COALESCE(com.value_num, '1'::double precision) * rere.value_num) * n.csv) * CASE WHEN ((n.shop_concept = '2'::double precision) AND (n.ct_id = 1)) THEN (('0.01'::double precision * GREATEST((('1'::double precision + (n.pn_score_pt / '80'::double precision)) + (ln((LEAST(GREATEST(n.activity_map_fte, '4000'::double precision), '150000'::double precision) / '60000'::double precision)) / '7'::double precision)), '0.1'::double precision)) * ('1'::double precisio