explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zUV

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Sort (cost=2,373.52..2,382.60 rows=3,631 width=214) (actual rows= loops=)

  • Sort Key: plates.set_label, plates.plate_number
  • Sort Key: plates.set_label, plates.plate_number
  • Sort Method: quicksort Memory: 1,067kB
2. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=2,036.27..2,158.82 rows=3,631 width=214) (actual rows= loops=)

  • Hash Cond: (plates_1.id = plates.id)
3. 0.000 0.000 ↓ 0.0

HashAggregate (cost=1,852.58..1,888.89 rows=3,631 width=12) (actual rows= loops=)

  • Group Key: plates_1.id
4. 49.598 49.598 ↓ 1.0 3,639 1

Merge Join (cost=70Sort (cost=2,373.52..2,382.60 rows=3,631 width=214) (actual time=48.715..49.598 rows=3,639 loops=1)

5. 1.817 35.942 ↓ 1.0 3,639 1

Hash Right Join (cost=2,036.27..2,158.82 rows=3,631 width=214) (actual time=33.864..35.942 rows=3,639 loops=1)

  • Hash Cond: (plates_1.id = plates.id)
6. 1.746 31.876 ↑ 2.2 1,633 1

HashAggregate (cost=1,852.58..1,888.89 rows=3,631 width=12) (actual time=31.596..31.876 rows=1,633 loops=1)

  • Group Key: plates_1.id
7. 4.970 30.130 ↑ 5.3 8,404 1

Merge Join (cost=706.03..1,628.76 rows=44,763 width=4) (actual time=23.530..30.130 rows=8,404 loops=1)

  • Merge Cond: (((plates_1.set_label)::text = (sibling.set_label)::text) AND (plates_1.plate_number = sibling.plate_number))
  • Join Filter: (plates_1.id <> sibling.id)
  • Rows Removed by Join Filter: 3,639
8. 11.896 12.463 ↓ 1.0 3,639 1

Sort (cost=353.01..362.09 rows=3,631 width=35) (actual time=11.801..12.463 rows=3,639 loops=1)

  • Sort Key: plates_1.set_label, plates_1.plate_number
  • Sort Method: quicksort Memory: 390kB
9. 0.567 0.567 ↓ 1.0 3,639 1

Seq Scan on plates plates_1 (cost=0.00..138.31 rows=3,631 width=35) (actual time=0.005..0.567 rows=3,639 loops=1)

10. 11.998 12.697 ↓ 3.3 12,043 1

Sort (cost=353.01..362.09 rows=3,631 width=35) (actual time=11.664..12.697 rows=12,043 loops=1)

  • Sort Key: sibling.set_label, sibling.plate_number
  • Sort Method: quicksort Memory: 390kB
11. 0.699 0.699 ↓ 1.0 3,639 1

Seq Scan on plates sibling (cost=0.00..138.31 rows=3,631 width=35) (actual time=0.026..0.699 rows=3,639 loops=1)

12. 1.001 2.249 ↓ 1.0 3,639 1

Hash (cost=138.31..138.31 rows=3,631 width=206) (actual time=2.249..2.249 rows=3,639 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 735kB
13. 1.248 1.248 ↓ 1.0 3,639 1

Seq Scan on plates (cost=0.00..138.31 rows=3,631 width=206) (actual time=0.011..1.248 rows=3,639 loops=1)

  • Merge Cond: (((plates_1.set_label)::text = (sibling.set_label)::text) AND (plates_1.plate_number = sibling.plate_number))
  • Join Filter: (plates_1.id <> sibling.id)
14. 0.000 0.000 ↓ 0.0

Sort (cost=353.01..362.09 rows=3,631 width=35) (actual rows= loops=)

  • Sort Key: plates_1.set_label, plates_1.plate_number
15. 0.000 0.000 ↓ 0.0

Seq Scan on plates plates_1 (cost=0.00..138.31 rows=3,631 width=35) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Sort (cost=353.01..362.09 rows=3,631 width=35) (actual rows= loops=)

  • Sort Key: sibling.set_label, sibling.plate_number
17. 0.000 0.000 ↓ 0.0

Seq Scan on plates sibling (cost=0.00..138.31 rows=3,631 width=35) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash (cost=138.31..138.31 rows=3,631 width=206) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Seq Scan on plates (cost=0.00..138.31 rows=3,631 width=206) (actual rows= loops=)

Planning time : 0.700 ms