explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Zurb : Optimization for: Bad selectivity with subquery filter; plan #Hsix

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 6.036 23.205 ↑ 8,657.5 46,916 1

Nested Loop (cost=0.92..43,982,314.32 rows=406,176,246 width=160) (actual time=0.057..23.205 rows=46,916 loops=1)

  • Buffers: shared hit=10808
2.          

CTE current_rollup

3. 0.004 0.027 ↑ 1.0 1 1

Result (cost=0.33..0.34 rows=1 width=8) (actual time=0.026..0.027 rows=1 loops=1)

  • Buffers: shared hit=3
4.          

Initplan (for Result)

5. 0.000 0.023 ↑ 1.0 1 1

Limit (cost=0.29..0.33 rows=1 width=8) (actual time=0.023..0.023 rows=1 loops=1)

  • Buffers: shared hit=3
6. 0.023 0.023 ↑ 8,617.0 1 1

Index Only Scan using ledger_zerosum_rollup__window_end on ledger_zerosum_rollup (cost=0.29..406.08 rows=8,617 width=8) (actual time=0.022..0.023 rows=1 loops=1)

  • Index Cond: (window_end IS NOT NULL)
  • Heap Fetches: 1
  • Buffers: shared hit=3
7. 0.028 0.028 ↑ 1.0 1 1

CTE Scan on current_rollup (cost=0.00..0.02 rows=1 width=8) (actual time=0.027..0.028 rows=1 loops=1)

  • Buffers: shared hit=3
8. 17.141 17.141 ↑ 8,657.5 46,916 1

Index Scan using ledger__created on ledger (cost=0.58..39,920,551.49 rows=406,176,246 width=152) (actual time=0.028..17.141 rows=46,916 loops=1)

  • Index Cond: (created > current_rollup.cutoff)
  • Buffers: shared hit=10805
Planning time : 0.126 ms
Execution time : 25.292 ms