explain.depesz.com

PostgreSQL's explain analyze made readable

Result: I6fR

Settings
# exclusive inclusive rows x rows loops node
1. 0.031 63,953.965 ↓ 1.4 47 1

Limit (cost=2.88..15,670,290.40 rows=34 width=114) (actual time=1,457.851..63,953.965 rows=47 loops=1)

  • Buffers: shared hit=2,897,079 read=17,657,538 dirtied=3
2.          

Initplan (for Limit)

3. 0.002 0.009 ↑ 1.0 1 1

Aggregate (cost=2.73..2.74 rows=1 width=8) (actual time=0.009..0.009 rows=1 loops=1)

  • Buffers: shared hit=3
4. 0.002 0.007 ↑ 1.0 1 1

Nested Loop (cost=0.14..2.73 rows=1 width=4) (actual time=0.006..0.007 rows=1 loops=1)

  • Buffers: shared hit=3
5. 0.002 0.002 ↑ 1.0 1 1

Seq Scan on isp_currency ispcurrenc9_ (cost=0.00..1.05 rows=1 width=4) (actual time=0.001..0.002 rows=1 loops=1)

  • Filter: (isp_id = 1)
  • Rows Removed by Filter: 3
  • Buffers: shared hit=1
6. 0.003 0.003 ↑ 1.0 1 1

Index Only Scan using currency_pkey on currency currency10_ (cost=0.14..1.66 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=1)

  • Index Cond: (currency_id = ispcurrenc9_.currency_id)
  • Heap Fetches: 0
  • Buffers: shared hit=2
7. 0.555 63,953.925 ↓ 1.4 47 1

Index Scan using tariff_name_key on tariff tariff0_ (cost=0.14..15,670,287.65 rows=34 width=114) (actual time=1,457.851..63,953.925 rows=47 loops=1)

  • Index Cond: (isp_id = 1)
  • Buffers: shared hit=2,897,079 read=17,657,538 dirtied=3
8.          

SubPlan (for Index Scan)

9. 86.151 63,951.537 ↑ 1.0 1 47

Aggregate (cost=460,885.76..460,885.77 rows=1 width=8) (actual time=1,360.671..1,360.671 rows=1 loops=47)

  • Buffers: shared hit=2,896,833 read=17,657,537 dirtied=3
10. 113.693 63,865.386 ↓ 1.1 22,185 47

Nested Loop (cost=0.14..460,835.03 rows=20,292 width=4) (actual time=636.721..1,358.838 rows=22,185 loops=47)

  • Buffers: shared hit=2,896,833 read=17,657,537 dirtied=3
11. 0.235 0.235 ↑ 1.0 1 47

Index Only Scan using tariff_pkey on tariff tariff2_ (cost=0.14..1.66 rows=1 width=4) (actual time=0.002..0.005 rows=1 loops=47)

  • Index Cond: (tariff_id = tariff0_.tariff_id)
  • Heap Fetches: 0
  • Buffers: shared hit=48
12. 63,751.458 63,751.458 ↓ 1.1 22,185 47

Seq Scan on subscription subscripti1_ (cost=0.00..460,630.45 rows=20,292 width=8) (actual time=636.715..1,356.414 rows=22,185 loops=47)

  • Filter: ((delete_date IS NULL) AND (isp_id = 1) AND (tariff_id = tariff0_.tariff_id))
  • Rows Removed by Filter: 1,473,954
  • Buffers: shared hit=2,896,785 read=17,657,537 dirtied=3
13. 0.329 1.833 ↑ 1.0 1 47

Aggregate (cost=4.79..4.80 rows=1 width=8) (actual time=0.039..0.039 rows=1 loops=47)

  • Buffers: shared hit=239
14. 0.094 1.504 ↑ 1.0 1 47

Nested Loop Semi Join (cost=0.57..4.78 rows=1 width=4) (actual time=0.031..0.032 rows=1 loops=47)

  • Join Filter: (ispcurrenc3_.currency_id = tariffsetu6_.currency_id)
  • Buffers: shared hit=239
15. 0.235 0.611 ↑ 1.0 1 47

Nested Loop (cost=0.14..2.73 rows=1 width=8) (actual time=0.012..0.013 rows=1 loops=47)

  • Buffers: shared hit=95
16. 0.188 0.188 ↑ 1.0 1 47

Seq Scan on isp_currency ispcurrenc3_ (cost=0.00..1.05 rows=1 width=4) (actual time=0.003..0.004 rows=1 loops=47)

  • Filter: (isp_id = 1)
  • Rows Removed by Filter: 3
  • Buffers: shared hit=47
17. 0.188 0.188 ↑ 1.0 1 47

Index Only Scan using currency_pkey on currency currency4_ (cost=0.14..1.66 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=47)

  • Index Cond: (currency_id = ispcurrenc3_.currency_id)
  • Heap Fetches: 0
  • Buffers: shared hit=48
18. 0.188 0.799 ↑ 1.0 1 47

Nested Loop (cost=0.43..2.04 rows=1 width=8) (actual time=0.017..0.017 rows=1 loops=47)

  • Buffers: shared hit=144
19. 0.188 0.470 ↑ 1.0 1 47

Nested Loop (cost=0.29..0.37 rows=1 width=12) (actual time=0.010..0.010 rows=1 loops=47)

  • Join Filter: (tariffsetu6_.currency_id = currency7_.currency_id)
  • Buffers: shared hit=96
20. 0.235 0.235 ↑ 1.0 1 47

Index Only Scan using tariff_setup_price_tariff_id_key on tariff_setup_price tariffsetu6_ (cost=0.14..0.18 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=47)

  • Index Cond: ((tariff_id = tariff0_.tariff_id) AND (currency_id = currency4_.currency_id))
  • Heap Fetches: 0
  • Buffers: shared hit=48
21. 0.047 0.047 ↑ 1.0 1 47

Index Only Scan using currency_pkey on currency currency7_ (cost=0.14..0.18 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=47)

  • Index Cond: (currency_id = currency4_.currency_id)
  • Heap Fetches: 0
  • Buffers: shared hit=48
22. 0.141 0.141 ↑ 1.0 1 47

Index Only Scan using tariff_pkey on tariff tariff8_ (cost=0.14..1.66 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=47)

  • Index Cond: (tariff_id = tariff0_.tariff_id)
  • Heap Fetches: 0
  • Buffers: shared hit=48