explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pvpN : Optimization for: plan #lTqi

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.001 8.275 ↑ 1.0 1 1

Limit (cost=976.31..976.31 rows=1 width=573) (actual time=8.275..8.275 rows=1 loops=1)

2. 0.004 8.274 ↑ 2.0 1 1

Sort (cost=976.31..976.31 rows=2 width=573) (actual time=8.274..8.274 rows=1 loops=1)

  • Sort Key: (((keytime.datetimecode -> 'sampleCount'::text))::bigint)
  • Sort Method: quicksort Memory: 25kB
3. 0.002 8.270 ↑ 1.0 2 1

Unique (cost=976.26..976.30 rows=2 width=573) (actual time=8.268..8.270 rows=2 loops=1)

4. 0.006 8.268 ↑ 1.0 2 1

Sort (cost=976.26..976.27 rows=2 width=573) (actual time=8.267..8.268 rows=2 loops=1)

  • Sort Key: keytime.id, keytime.datetimecode, keytime.fixed, keytime.hint, keytime.samplecount, (((keytime.datetimecode -> 'sampleCount'::text))::bigint)
  • Sort Method: quicksort Memory: 25kB
5. 0.002 8.262 ↑ 1.0 2 1

Append (cost=459.17..976.25 rows=2 width=573) (actual time=3.664..8.262 rows=2 loops=1)

6. 0.001 3.664 ↑ 1.0 1 1

Limit (cost=459.17..459.17 rows=1 width=183) (actual time=3.664..3.664 rows=1 loops=1)

7. 0.016 3.663 ↑ 17.0 1 1

Sort (cost=459.17..459.21 rows=17 width=183) (actual time=3.663..3.663 rows=1 loops=1)

  • Sort Key: (((keytime.datetimecode -> 'sampleCount'::text))::bigint)
  • Sort Method: top-N heapsort Memory: 25kB
8. 3.647 3.647 ↓ 2.9 50 1

Seq Scan on keytime (cost=0.00..459.08 rows=17 width=183) (actual time=0.056..3.647 rows=50 loops=1)

  • Filter: (((datetimecode -> 'anchorTime'::text) IS NULL) AND (((datetimecode -> 'sampleCount'::text))::bigint > '1434592715184000'::bigint))
  • Rows Removed by Filter: 9,950
9. 0.002 4.596 ↑ 1.0 1 1

Subquery Scan on "*SELECT* 2" (cost=517.05..517.06 rows=1 width=183) (actual time=4.595..4.596 rows=1 loops=1)

10. 0.002 4.594 ↑ 1.0 1 1

Limit (cost=517.05..517.05 rows=1 width=191) (actual time=4.593..4.594 rows=1 loops=1)

11. 0.083 4.592 ↑ 3,317.0 1 1

Sort (cost=517.05..525.34 rows=3,317 width=191) (actual time=4.592..4.592 rows=1 loops=1)

  • Sort Key: (((keytime_1.datetimecode -> 'sampleCount'::text))::bigint)
  • Sort Method: top-N heapsort Memory: 25kB
12. 4.509 4.509 ↑ 79.0 42 1

Seq Scan on keytime keytime_1 (cost=0.00..500.46 rows=3,317 width=191) (actual time=0.110..4.509 rows=42 loops=1)

  • Filter: (((datetimecode -> 'anchorTime'::text) IS NOT NULL) AND (((datetimecode -> 'sampleCount'::text))::bigint > 0))
  • Rows Removed by Filter: 9,958
Planning time : 0.138 ms
Execution time : 8.311 ms