explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Kip : slow query

Settings
# exclusive inclusive rows x rows loops node
1. 0.017 132,303.451 ↑ 1.0 1 1

Aggregate (cost=3,289,816.140..3,289,816.150 rows=1 width=8) (actual time=132,303.450..132,303.451 rows=1 loops=1)

2. 0.030 132,303.434 ↑ 248.6 52 1

Group (cost=2,632,299.010..3,289,654.560 rows=12,926 width=16) (actual time=132,303.395..132,303.434 rows=52 loops=1)

  • Group Key: india.quebec, ((delta 1))
3. 0.127 132,303.404 ↑ 248.6 52 1

Sort (cost=2,632,299.010..2,632,331.330 rows=12,926 width=16) (actual time=132,303.392..132,303.404 rows=52 loops=1)

  • Sort Key: india.quebec, ((delta 1))
  • Sort Method: quicksort Memory: 27kB
4. 39.685 132,303.277 ↑ 248.6 52 1

Seq Scan on india (cost=0.000..2,631,416.300 rows=12,926 width=16) (actual time=35,590.030..132,303.277 rows=52 loops=1)

  • Filter: ((delta 2) > 'romeo'::timestamp without time zone)
  • Rows Removed by Filter: 38663
5.          

SubPlan (for Seq Scan)

6. 0.104 168.012 ↑ 1.0 1 52

Limit (cost=0.290..50.850 rows=1 width=16) (actual time=3.230..3.231 rows=1 loops=52)

7. 167.908 167.908 ↑ 16.0 1 52

Index Scan using yankee on three uniform (cost=0.290..809.250 rows=16 width=16) (actual time=3.229..3.229 rows=1 loops=52)

  • Filter: (zulu = india.quebec)
  • Rows Removed by Filter: 17776
8. 38.715 132,095.580 ↓ 0.0 0 38,715

Limit (cost=0.290..50.850 rows=1 width=16) (actual time=3.412..3.412 rows=0 loops=38,715)

9. 132,056.865 132,056.865 ↓ 0.0 0 38,715

Index Scan using yankee on three four (cost=0.290..809.250 rows=16 width=16) (actual time=3.411..3.411 rows=0 loops=38,715)

  • Filter: (zulu = india.quebec)
  • Rows Removed by Filter: 17930
Planning time : 0.229 ms
Execution time : 132,303.500 ms