explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TRzw

Settings
# exclusive inclusive rows x rows loops node
1. 0.054 2,630.718 ↓ 1.5 3 1

Index Scan Backward using currency_pkey on currency (cost=0.13..280,895.41 rows=2 width=276) (actual time=841.829..2,630.718 rows=3 loops=1)

  • Filter: is_active
  • Rows Removed by Filter: 2
2.          

SubPlan (for Index Scan Backward)

3. 0.006 0.093 ↑ 1.0 1 3

Limit (cost=8.34..8.34 rows=1 width=43) (actual time=0.031..0.031 rows=1 loops=3)

4. 0.030 0.087 ↑ 3.0 1 3

Sort (cost=8.34..8.34 rows=3 width=43) (actual time=0.029..0.029 rows=1 loops=3)

  • Sort Key: address.id DESC
  • Sort Method: quicksort Memory: 25kB
5. 0.057 0.057 ↑ 1.5 2 3

Index Scan using address_type on address (cost=0.29..8.32 rows=3 width=43) (actual time=0.016..0.019 rows=2 loops=3)

  • Index Cond: (address_type = 'Shield'::e_address_type)
  • Filter: (currency_id = currency.id)
  • Rows Removed by Filter: 7
6. 0.003 0.033 ↑ 1.0 1 3

Limit (cost=4.63..4.64 rows=1 width=43) (actual time=0.011..0.011 rows=1 loops=3)

7. 0.012 0.030 ↑ 1.0 1 3

Sort (cost=4.63..4.64 rows=1 width=43) (actual time=0.010..0.010 rows=1 loops=3)

  • Sort Key: address_1.id DESC
  • Sort Method: quicksort Memory: 25kB
8. 0.018 0.018 ↓ 2.0 2 3

Index Scan using address_type on address address_1 (cost=0.29..4.62 rows=1 width=43) (actual time=0.005..0.006 rows=2 loops=3)

  • Index Cond: (address_type = 'Cover'::e_address_type)
  • Filter: (currency_id = currency.id)
  • Rows Removed by Filter: 8
9. 0.003 2,630.538 ↑ 1.0 1 3

Limit (cost=140,433.12..140,433.13 rows=1 width=36) (actual time=876.846..876.846 rows=1 loops=3)

10. 413.130 2,630.535 ↑ 294,365.0 1 3

Sort (cost=140,433.12..141,169.04 rows=294,365 width=36) (actual time=876.845..876.845 rows=1 loops=3)

  • Sort Key: block.height DESC
  • Sort Method: top-N heapsort Memory: 25kB
11. 2,217.405 2,217.405 ↓ 1.6 464,203 3

Seq Scan on block (cost=0.00..138,961.30 rows=294,365 width=36) (actual time=8.050..739.135 rows=464,203 loops=3)

  • Filter: (is_ingested AND (NOT is_orphaned) AND (currency_id = currency.id))
  • Rows Removed by Filter: 1016078
Planning time : 0.319 ms
Execution time : 2,630.776 ms