explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lLsj

Settings
# exclusive inclusive rows x rows loops node
1. 726.526 726.526 ↑ 1.0 30 1

CTE Scan on paged_loads q (cost=696.85..855.10 rows=30 width=4,495) (actual time=102.836..726.526 rows=30 loops=1)

2.          

CTE q

3. 0.147 7.345 ↑ 37.5 30 1

WindowAgg (cost=675.16..694.83 rows=1,124 width=318) (actual time=7.176..7.345 rows=30 loops=1)

4. 0.812 7.198 ↑ 37.5 30 1

Sort (cost=675.16..677.97 rows=1,124 width=310) (actual time=7.170..7.198 rows=30 loops=1)

  • Sort Key: l.internal_reference_id DESC
  • Sort Method: quicksort Memory: 407kB
5. 1.187 6.386 ↑ 1.1 1,007 1

Hash Join (cost=286.97..618.20 rows=1,124 width=310) (actual time=4.697..6.386 rows=1,007 loops=1)

  • Hash Cond: (lf.load_id = l.id)
6. 0.580 0.580 ↓ 1.0 4,367 1

Seq Scan on load_fact lf (cost=0.00..303.63 rows=4,363 width=138) (actual time=0.015..0.580 rows=4,367 loops=1)

7. 0.362 4.619 ↑ 1.2 943 1

Hash (cost=273.22..273.22 rows=1,100 width=188) (actual time=4.619..4.619 rows=943 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 170kB
8. 0.396 4.257 ↑ 1.2 943 1

Hash Join (cost=226.10..273.22 rows=1,100 width=188) (actual time=3.778..4.257 rows=943 loops=1)

  • Hash Cond: (tl.id = l.id)
9. 0.150 0.150 ↑ 1.2 943 1

Seq Scan on temp_load tl (cost=0.00..32.00 rows=1,100 width=8) (actual time=0.039..0.150 rows=943 loops=1)

  • Filter: should_return
10. 2.047 3.711 ↑ 1.0 4,242 1

Hash (cost=172.71..172.71 rows=4,271 width=180) (actual time=3.711..3.711 rows=4,242 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 933kB
11. 1.664 1.664 ↑ 1.0 4,242 1

Seq Scan on load l (cost=0.00..172.71 rows=4,271 width=180) (actual time=0.012..1.664 rows=4,242 loops=1)

12.          

CTE paged_loads

13. 0.015 7.510 ↑ 1.0 30 1

Limit (cost=0.00..2.02 rows=30 width=3,795) (actual time=7.182..7.510 rows=30 loops=1)

14. 7.495 7.495 ↑ 12.5 30 1

CTE Scan on q q_1 (cost=0.00..25.29 rows=375 width=3,795) (actual time=7.181..7.495 rows=30 loops=1)

  • Filter: (row_number > 0)
Planning time : 1.161 ms
Execution time : 727.395 ms