explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lM7I

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

Sort (cost=20,532.27..20,532.28 rows=1 width=48) (actual rows= loops=)

  • Sort Key: rd.pk, rmd.pk, wpd.pk
2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=21.99..20,532.26 rows=1 width=48) (actual rows= loops=)

  • Filter: (((rmd.pk IS NULL) AND (rd.pk IS NULL)) OR (rd.pk = 188) OR (rmd.robotfk = 188))
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..20,506.95 rows=1 width=40) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.57..20,506.70 rows=1 width=40) (actual rows= loops=)

  • Join Filter: (rd.positionfk = wpd.pk)
5. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=0.57..94.98 rows=1 width=32) (actual rows= loops=)

  • Merge Cond: (wpd.pk = ri.waitingpositionfk)
  • Filter: (ri.pk IS NULL)
6. 0.000 0.000 ↓ 0.0

Index Scan using waitingposition_pkey on waitingposition wpd (cost=0.15..17.34 rows=267 width=32) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Index Scan using robotincompatibility_waitingpositionfk_idx on robotincompatibility ri (cost=0.42..9,801.81 rows=8,277 width=16) (actual rows= loops=)

  • Filter: (((robotfk = 188) OR (robotfk IS NULL)) AND (status = 'NOT_FINISHED'::robotincompatibilitystatus))
8. 0.000 0.000 ↓ 0.0

Seq Scan on robot rd (cost=0.00..20,410.66 rows=84 width=16) (actual rows= loops=)

  • Filter: (positiontype = 'WAITING_POSITION'::robotpositiontype)
9. 0.000 0.000 ↓ 0.0

Index Scan using waitingpositionrobotpositionassociation_waitingpositionfk_idx on waitingpositionrobotpositionassociation wprp (cost=0.15..0.24 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (waitingpositionfk = wpd.pk)
  • Filter: ((positiontype = 'STATION'::robotpositiontype) AND (positionfk = 14))
10. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on robotmission rmd (cost=21.28..25.30 rows=1 width=24) (actual rows= loops=)

  • Recheck Cond: ((destinationfk = wpd.pk) AND (status = 'NOT_FINISHED'::robotmissionstatus))
  • Filter: (destinationtype = 'WAITING_POSITION'::robotpositiontype)
11. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=21.28..21.28 rows=1 width=0) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_robotmission_destinationfk (cost=0.00..9.45 rows=176 width=0) (actual rows= loops=)

  • Index Cond: (destinationfk = wpd.pk)
13. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on robotmission_status_idx (cost=0.00..11.54 rows=415 width=0) (actual rows= loops=)

  • Index Cond: (status = 'NOT_FINISHED'::robotmissionstatus)