explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Tl8

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 0.400 ↓ 0.0 4 1

Nested loop inner join (cost=3.85 rows=8) (cost=0..0 rows=0 width=0) (actual time=0.296..0.400 rows=4 loops=1)

2. 0.264 0.356 ↓ 0.0 4 1

Filter: (<in_optimizer>(odo.date_created,<exists>(select #2)) and (odo.to_organization_id is not null)) (cost=1.05 rows=8) (cost=0..0 rows=0 width=0) (actual time=0.266..0.356 rows=4 loops=1)

  • -> Select #2 (subquery in condition; dependent)
3. 0.000 0.092 ↓ 0.0 8 1

Table scan on odo (cost=1.05 rows=8) (cost=0..0 rows=0 width=0) (actual time=0.084..0.092 rows=8 loops=1)

4. 0.000 0.232 ↓ 0.0 0 8

Limit: 1 row(s) (cost=0..0 rows=0 width=0) (actual time=0.029..0.029 rows=0 loops=8)

5. 0.008 0.232 ↓ 0.0 0 8

Filter: (<cache>(odo.date_created) = <ref_null_helper>(max(odorder.date_created))) (cost=0..0 rows=0 width=0) (actual time=0.029..0.029 rows=0 loops=8)

6. 0.016 0.224 ↓ 0.0 1 8

Aggregate: max(odorder.date_created) (cost=0..0 rows=0 width=0) (actual time=0.028..0.028 rows=1 loops=8)

7. 0.032 0.208 ↓ 0.0 2 8

Filter: (odorder.delivery_no = odo.delivery_no) (cost=0.35 rows=1) (cost=0..0 rows=0 width=0) (actual time=0.016..0.026 rows=2 loops=8)

8. 0.176 0.176 ↓ 0.0 8 8

Table scan on odorder (cost=0.35 rows=8) (cost=0..0 rows=0 width=0) (actual time=0.013..0.022 rows=8 loops=8)

9. 0.040 0.040 ↓ 0.0 1 4

Single-row index lookup on ori using PRIMARY (organization_id=odo.to_organization_id) (cost=0.26 rows=1) (cost=0..0 rows=0 width=0) (actual time=0.010..0.010 rows=1 loops=4)