explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4hkw

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 0.146 ↓ 1.5 3 1

Sort (cost=28.61..28.61 rows=2 width=276) (actual time=0.145..0.146 rows=3 loops=1)

  • Sort Key: currency.id DESC
  • Sort Method: quicksort Memory: 26kB
2. 0.014 0.137 ↓ 1.5 3 1

Seq Scan on currency (cost=0.00..28.60 rows=2 width=276) (actual time=0.075..0.137 rows=3 loops=1)

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

SubPlan (forSeq Scan)

4. 0.006 0.045 ↑ 1.0 1 3

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

5. 0.006 0.039 ↑ 3.0 1 3

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

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

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

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

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

8. 0.009 0.036 ↑ 1.0 1 3

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

  • Sort Key: address_1.id DESC
  • Sort Method: quicksort Memory: 25kB
9. 0.027 0.027 ↓ 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.007..0.009 rows=2 loops=3)

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

Limit (cost=0.43..0.80 rows=1 width=36) (actual time=0.013..0.014 rows=1 loops=3)

11. 0.039 0.039 ↑ 295,198.0 1 3

Index Scan using block_currency_id_height_idx on block (cost=0.43..109,110.40 rows=295,198 width=36) (actual time=0.013..0.013 rows=1 loops=3)

  • Index Cond: (currency_id = currency.id)
  • Filter: (is_ingested AND (NOT is_orphaned))
  • Rows Removed by Filter: 1
Planning time : 0.449 ms
Execution time : 0.210 ms