explain.depesz.com

PostgreSQL's explain analyze made readable

Result: abPt

Settings
# exclusive inclusive rows x rows loops node
1. 2.059 14,834.779 ↑ 1.2 185 1

GroupAggregate (cost=792,443.84..792,825.01 rows=229 width=20) (actual time=14,720.996..14,834.779 rows=185 loops=1)

  • Group Key: c.name
2. 267.271 14,832.720 ↑ 5.4 9,131 1

Sort (cost=792,443.84..792,567.08 rows=49,296 width=12) (actual time=14,676.552..14,832.720 rows=9,131 loops=1)

  • Sort Key: c.name
  • Sort Method: external merge Disk: 176kB
3. 14,341.459 14,565.449 ↑ 5.4 9,131 1

Nested Loop (cost=0.00..787,516.92 rows=49,296 width=12) (actual time=0.135..14,565.449 rows=9,131 loops=1)

  • Join Filter: ((c.way && p.way) AND _st_intersects(c.way, p.way))
  • Rows Removed by Join Filter: 2512405
4. 0.154 0.154 ↑ 1.0 276 1

Seq Scan on adm2 c (cost=0.00..46.80 rows=276 width=245,965) (actual time=0.014..0.154 rows=276 loops=1)

5. 221.001 223.836 ↑ 1.0 9,136 276

Materialize (cost=0.00..1,099.48 rows=9,136 width=32) (actual time=0.002..0.811 rows=9,136 loops=276)

6. 2.835 2.835 ↑ 1.0 9,136 1

Seq Scan on cities p (cost=0.00..990.80 rows=9,136 width=32) (actual time=0.006..2.835 rows=9,136 loops=1)