explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pnnt

Settings
# exclusive inclusive rows x rows loops node
1. 0.097 469.711 ↑ 6.7 30 1

Sort (cost=4,911.60..4,912.10 rows=200 width=76) (actual time=469.705..469.711 rows=30 loops=1)

  • Sort Key: merged.nb_stops DESC
  • Sort Method: quicksort Memory: 258kB
2.          

CTE stops

3. 204.276 204.276 ↑ 3.1 636 1

Index Scan using history_place_stops_history_place_id_idx on history_place_stops (cost=0.42..4,021.75 rows=1,957 width=1,720) (actual time=0.920..204.276 rows=636 loops=1)

  • Index Cond: (history_place_id = 172026)
  • Filter: (ellipse_95 IS NOT NULL)
  • Rows Removed by Filter: 2687
4.          

CTE clustered

5. 126.821 332.785 ↑ 3.1 636 1

WindowAgg (cost=0.00..63.60 rows=1,957 width=92) (actual time=331.957..332.785 rows=636 loops=1)

6. 205.964 205.964 ↑ 3.1 636 1

CTE Scan on stops (cost=0.00..39.14 rows=1,957 width=88) (actual time=0.924..205.964 rows=636 loops=1)

7.          

CTE merged

8. 118.413 452.181 ↑ 6.7 30 1

HashAggregate (cost=58.61..62.11 rows=200 width=76) (actual time=336.457..452.181 rows=30 loops=1)

  • Group Key: clustered.cluster_id
9. 333.768 333.768 ↑ 3.2 607 1

CTE Scan on clustered (cost=0.00..39.14 rows=1,947 width=40) (actual time=331.964..333.768 rows=607 loops=1)

  • Filter: (cluster_id IS NOT NULL)
  • Rows Removed by Filter: 29
10. 469.614 469.614 ↑ 6.7 30 1

CTE Scan on merged (cost=0.00..756.50 rows=200 width=76) (actual time=337.683..469.614 rows=30 loops=1)

Planning time : 0.263 ms
Execution time : 470.059 ms