explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1qjc

Settings
# exclusive inclusive rows x rows loops node
1. 0.089 4.934 ↑ 1.2 838 1

Sort (cost=259.10..261.61 rows=1,006 width=29) (actual time=4.877..4.934 rows=838 loops=1)

  • Sort Key: row_number.row_number
  • Sort Method: quicksort Memory: 91kB
2.          

Initplan (for Sort)

3. 0.066 0.166 ↑ 1.0 1 1

Aggregate (cost=54.35..54.36 rows=1 width=8) (actual time=0.166..0.166 rows=1 loops=1)

4. 0.100 0.100 ↑ 1.0 828 1

Seq Scan on warehouses warehouses_2 (cost=0.00..52.28 rows=828 width=0) (actual time=0.003..0.100 rows=828 loops=1)

5. 2.818 4.679 ↑ 1.2 838 1

Hash Join (cost=116.98..154.56 rows=1,006 width=29) (actual time=1.690..4.679 rows=838 loops=1)

  • Hash Cond: (((array_agg(warehouses_1.name ORDER BY warehouses_1.name, warehouses_1.id))[row_number.row_number])::text = (warehouses.name)::text)
6. 0.123 1.294 ↑ 1.2 828 1

Nested Loop (cost=54.35..74.38 rows=1,000 width=40) (actual time=1.105..1.294 rows=828 loops=1)

7. 0.762 0.866 ↑ 1.0 1 1

Aggregate (cost=54.35..54.36 rows=1 width=32) (actual time=0.866..0.866 rows=1 loops=1)

8. 0.104 0.104 ↑ 1.0 828 1

Seq Scan on warehouses warehouses_1 (cost=0.00..52.28 rows=828 width=21) (actual time=0.003..0.104 rows=828 loops=1)

9. 0.305 0.305 ↑ 1.2 828 1

Function Scan on generate_series row_number (cost=0.00..10.00 rows=1,000 width=8) (actual time=0.238..0.305 rows=828 loops=1)

10. 0.187 0.567 ↑ 1.0 828 1

Hash (cost=52.28..52.28 rows=828 width=21) (actual time=0.567..0.567 rows=828 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 51kB
11. 0.380 0.380 ↑ 1.0 828 1

Seq Scan on warehouses (cost=0.00..52.28 rows=828 width=21) (actual time=0.012..0.380 rows=828 loops=1)

Planning time : 0.980 ms
Execution time : 5.057 ms