explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Rj6N

Settings
# exclusive inclusive rows x rows loops node
1. 0.123 56,660.083 ↓ 10.0 10 1

Limit (cost=33,289.80..33,289.81 rows=1 width=409) (actual time=56,659.958..56,660.083 rows=10 loops=1)

2. 278.203 56,659.960 ↓ 10.0 10 1

Sort (cost=33,289.80..33,289.81 rows=1 width=409) (actual time=56,659.955..56,659.960 rows=10 loops=1)

  • Sort Key: this_.id
  • Sort Method: top-N heapsort Memory: 27kB
3. 945.657 56,381.757 ↓ 252,012.0 252,012 1

Nested Loop Left Join (cost=22,993.75..33,289.79 rows=1 width=409) (actual time=852.681..56,381.757 rows=252,012 loops=1)

  • Join Filter: (this_.customer_id = domain3_.id)
  • Rows Removed by Join Filter: 252012
4. 27,128.759 55,184.088 ↓ 252,012.0 252,012 1

Nested Loop Left Join (cost=22,993.75..33,265.62 rows=1 width=309) (actual time=852.663..55,184.088 rows=252,012 loops=1)

  • Join Filter: (this_.address_book_id = addressboo2_.id)
  • Rows Removed by Join Filter: 56954712
5. 0.000 1,090.045 ↓ 252,012.0 252,012 1

Gather (cost=22,993.75..33,257.55 rows=1 width=293) (actual time=852.352..1,090.045 rows=252,012 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 194.344 1,174.469 ↓ 84,004.0 84,004 3 / 3

Hash Join (cost=21,993.75..32,257.45 rows=1 width=293) (actual time=875.234..1,174.469 rows=84,004 loops=3)

  • Hash Cond: ((this_.id = (max(this__1.id))) AND (this_.name = this__1.name))
7. 106.200 106.200 ↑ 1.2 84,004 3 / 3

Parallel Seq Scan on nst_netobjs this_ (cost=0.00..9,712.52 rows=104,988 width=293) (actual time=0.022..106.200 rows=84,004 loops=3)

  • Filter: (version_id = 151)
  • Rows Removed by Filter: 9533
8. 196.280 873.925 ↓ 1.1 252,012 3 / 3

Hash (cost=18,447.54..18,447.54 rows=236,414 width=52) (actual time=873.924..873.925 rows=252,012 loops=3)

  • Buckets: 262144 Batches: 1 Memory Usage: 23205kB
9. 427.806 677.645 ↓ 1.1 252,012 3 / 3

HashAggregate (cost=13,719.26..16,083.40 rows=236,414 width=52) (actual time=484.357..677.645 rows=252,012 loops=3)

  • Group Key: this__1.name
10. 249.839 249.839 ↓ 1.0 252,012 3 / 3

Seq Scan on nst_netobjs this__1 (cost=0.00..12,460.17 rows=251,819 width=52) (actual time=0.034..249.839 rows=252,012 loops=3)

  • Filter: (((duplicate_of_id IS NULL) OR (duplicate_of_id = '-1'::integer)) AND (version_id = 151))
  • Rows Removed by Filter: 28599
11. 26,965.284 26,965.284 ↓ 1.0 226 252,012

Seq Scan on nst_address_books addressboo2_ (cost=0.00..5.25 rows=225 width=16) (actual time=0.003..0.107 rows=226 loops=252,012)

12. 252.012 252.012 ↑ 630.0 1 252,012

Seq Scan on customers domain3_ (cost=0.00..16.30 rows=630 width=100) (actual time=0.001..0.001 rows=1 loops=252,012)