explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2M0

Settings
# exclusive inclusive rows x rows loops node
1. 13.617 27,003.375 ↑ 1.0 1,478 1

Seq Scan on lu_tracts t (cost=0.00..3,567,853.88 rows=1,478 width=28) (actual time=19.308..27,003.375 rows=1,478 loops=1)

2.          

SubPlan (for Seq Scan)

3. 28.082 25,788.144 ↑ 1.0 1 1,478

Aggregate (cost=1,992.47..1,992.48 rows=1 width=8) (actual time=17.448..17.448 rows=1 loops=1,478)

4. 25,760.062 25,760.062 ↑ 1.0 68 1,478

Seq Scan on facts f (cost=0.00..1,992.30 rows=68 width=0) (actual time=0.145..17.429 rows=68 loops=1,478)

  • Filter: ((tract_id)::text = (t.tract_id)::text)
  • Rows Removed by Filter: 100436
5. 26.604 1,201.614 ↑ 1.0 1 1,478

Aggregate (cost=421.46..421.47 rows=1 width=8) (actual time=0.813..0.813 rows=1 loops=1,478)

6. 26.604 1,175.010 ↑ 1.0 51 1,478

Nested Loop Semi Join (cost=0.42..421.33 rows=51 width=0) (actual time=0.035..0.795 rows=51 loops=1,478)

7. 17.736 17.736 ↑ 1.0 51 1,478

Seq Scan on lu_fact_types y (cost=0.00..2.51 rows=51 width=4) (actual time=0.003..0.012 rows=51 loops=1,478)

8. 1,130.670 1,130.670 ↑ 1.0 1 75,378

Index Only Scan using pk_facts on facts f_1 (cost=0.42..8.20 rows=1 width=4) (actual time=0.015..0.015 rows=1 loops=75,378)

  • Index Cond: ((fact_type_id = y.fact_type_id) AND (tract_id = (t.tract_id)::text))
  • Heap Fetches: 75378
Planning time : 0.440 ms
Execution time : 27,004.359 ms