explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bTON

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=1,419.79..1,419.85 rows=2 width=80) (actual rows= loops=)

  • Group Key: ratedtrans0_.invoice_sub_category_id, ratedtrans0_.service_instance_id
2. 0.000 0.000 ↓ 0.0

Sort (cost=1,419.79..1,419.80 rows=2 width=28) (actual rows= loops=)

  • Sort Key: ratedtrans0_.invoice_sub_category_id, ratedtrans0_.service_instance_id
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.26..1,419.78 rows=2 width=28) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Index Scan using billing_service_instance_min_index on billing_service_instance serviceins1_ (cost=0.12..2.34 rows=1 width=8) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Append (cost=0.13..1,413.50 rows=394 width=28) (actual rows= loops=)

  • Subplans Removed: 21
6. 0.000 0.000 ↓ 0.0

Index Scan using billing_rated_transaction_201_billing_account__id_usage_da_idx1 on billing_rated_transaction_2019_01_01 ratedtrans0_ (cost=0.13..2.35 rows=1 width=60) (actual rows= loops=)

  • Index Cond: ((to_date('01 Jan 0'::text, 'DDMonYYYY'::text) < usage_date) AND (usage_date < now()))
  • Filter: ((subscription_id = 7000) AND (serviceins1_.id = service_instance_id))
7. 0.000 0.000 ↓ 0.0

Index Scan using billing_rated_transaction_20_billing_account__id_usage_da_idx15 on billing_rated_transaction_2019_02_19 ratedtrans0__7 (cost=0.13..2.35 rows=1 width=60) (actual rows= loops=)

  • Index Cond: ((to_date('01 Jan 0'::text, 'DDMonYYYY'::text) < usage_date) AND (usage_date < now()))
  • Filter: ((subscription_id = 7000) AND (serviceins1_.id = service_instance_id))
8. 0.000 0.000 ↓ 0.0

Index Scan using billing_rated_transaction_201_subscription_id_usage_date_s_idx8 on billing_rated_transaction_2019_02_26 ratedtrans0__8 (cost=0.42..94.92 rows=29 width=28) (actual rows= loops=)

  • Index Cond: ((subscription_id = 7000) AND (to_date('01 Jan 0'::text, 'DDMonYYYY'::text) < usage_date) AND (usage_date < now()) AND (service_instance_id = serviceins1_.id))
9. 0.000 0.000 ↓ 0.0

Index Scan using billing_rated_transaction_201_subscription_id_usage_date_s_idx9 on billing_rated_transaction_2019_03_05 ratedtrans0__9 (cost=0.43..170.73 rows=53 width=28) (actual rows= loops=)

  • Index Cond: ((subscription_id = 7000) AND (to_date('01 Jan 0'::text, 'DDMonYYYY'::text) < usage_date) AND (usage_date < now()) AND (service_instance_id = serviceins1_.id))
10. 0.000 0.000 ↓ 0.0

Index Scan using billing_rated_transaction_20_subscription_id_usage_date_s_idx10 on billing_rated_transaction_2019_03_12 ratedtrans0__10 (cost=0.43..172.46 rows=53 width=28) (actual rows= loops=)

  • Index Cond: ((subscription_id = 7000) AND (to_date('01 Jan 0'::text, 'DDMonYYYY'::text) < usage_date) AND (usage_date < now()) AND (service_instance_id = serviceins1_.id))
11. 0.000 0.000 ↓ 0.0

Index Scan using billing_rated_transaction_20_subscription_id_usage_date_s_idx11 on billing_rated_transaction_2019_03_19 ratedtrans0__11 (cost=0.43..168.32 rows=52 width=28) (actual rows= loops=)

  • Index Cond: ((subscription_id = 7000) AND (to_date('01 Jan 0'::text, 'DDMonYYYY'::text) < usage_date) AND (usage_date < now()) AND (service_instance_id = serviceins1_.id))
12. 0.000 0.000 ↓ 0.0

Index Scan using billing_rated_transaction_20_subscription_id_usage_date_s_idx12 on billing_rated_transaction_2019_03_26 ratedtrans0__12 (cost=0.42..118.96 rows=37 width=28) (actual rows= loops=)

  • Index Cond: ((subscription_id = 7000) AND (to_date('01 Jan 0'::text, 'DDMonYYYY'::text) < usage_date) AND (usage_date < now()) AND (service_instance_id = serviceins1_.id))
13. 0.000 0.000 ↓ 0.0

Index Scan using billing_rated_transaction_20_subscription_id_usage_date_s_idx13 on billing_rated_transaction_2019_04_02 ratedtrans0__13 (cost=0.43..118.35 rows=8 width=28) (actual rows= loops=)

  • Index Cond: ((subscription_id = 7000) AND (to_date('01 Jan 0'::text, 'DDMonYYYY'::text) < usage_date) AND (usage_date < now()) AND (service_instance_id = serviceins1_.id))
14. 0.000 0.000 ↓ 0.0

Index Scan using billing_rated_transaction_20_subscription_id_usage_date_s_idx14 on billing_rated_transaction_2019_04_09 ratedtrans0__14 (cost=0.43..178.55 rows=56 width=28) (actual rows= loops=)

  • Index Cond: ((subscription_id = 7000) AND (to_date('01 Jan 0'::text, 'DDMonYYYY'::text) < usage_date) AND (usage_date < now()) AND (service_instance_id = serviceins1_.id))
15. 0.000 0.000 ↓ 0.0

Index Scan using billing_rated_transaction_20_subscription_id_usage_date_s_idx15 on billing_rated_transaction_2019_04_16 ratedtrans0__15 (cost=0.43..114.07 rows=9 width=28) (actual rows= loops=)

  • Index Cond: ((subscription_id = 7000) AND (to_date('01 Jan 0'::text, 'DDMonYYYY'::text) < usage_date) AND (usage_date < now()) AND (service_instance_id = serviceins1_.id))
16. 0.000 0.000 ↓ 0.0

Index Scan using billing_rated_transaction_20_subscription_id_usage_date_s_idx16 on billing_rated_transaction_2019_04_23 ratedtrans0__16 (cost=0.43..168.68 rows=52 width=28) (actual rows= loops=)

  • Index Cond: ((subscription_id = 7000) AND (to_date('01 Jan 0'::text, 'DDMonYYYY'::text) < usage_date) AND (usage_date < now()) AND (service_instance_id = serviceins1_.id))
17. 0.000 0.000 ↓ 0.0

Index Scan using billing_rated_transaction_20_billing_account__id_usage_da_idx35 on billing_rated_transaction_2019_04_30 ratedtrans0__17 (cost=0.13..2.35 rows=1 width=60) (actual rows= loops=)

  • Index Cond: ((to_date('01 Jan 0'::text, 'DDMonYYYY'::text) < usage_date) AND (usage_date < now()))
  • Filter: ((subscription_id = 7000) AND (serviceins1_.id = service_instance_id))
18. 0.000 0.000 ↓ 0.0

Index Scan using billing_rated_transaction_def_billing_account__id_usage_da_idx1 on billing_rated_transaction_default ratedtrans0__32 (cost=0.13..2.35 rows=1 width=60) (actual rows= loops=)

  • Index Cond: ((to_date('01 Jan 0'::text, 'DDMonYYYY'::text) < usage_date) AND (usage_date < now()))
  • Filter: ((subscription_id = 7000) AND (serviceins1_.id = service_instance_id))