explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3Co

Settings
# exclusive inclusive rows x rows loops node
1. 59.737 437,434.015 ↓ 91,428.0 91,428 1

Nested Loop (cost=3,594.30..8,955.58 rows=1 width=222) (actual time=11.653..437,434.015 rows=91,428 loops=1)

2. 0.000 436,962.614 ↓ 102,916.0 102,916 1

Gather (cost=3,594.16..8,955.42 rows=1 width=190) (actual time=11.625..436,962.614 rows=102,916 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
3. 436,949.449 437,044.694 ↓ 51,458.0 51,458 2

Nested Loop Left Join (cost=2,594.16..7,955.32 rows=1 width=190) (actual time=9.241..437,044.694 rows=51,458 loops=2)

  • Filter: (cmr.customer_metric_record_id IS NULL)
4. 12.922 86.755 ↓ 71.2 51,458 2

Append (cost=2,593.47..4,456.23 rows=723 width=191) (actual time=0.095..86.755 rows=51,458 loops=2)

5. 0.069 0.082 ↓ 0.0 0 2

Parallel Bitmap Heap Scan on internal_cost_records_201910 icr (cost=2,593.47..2,732.69 rows=81 width=190) (actual time=0.082..0.082 rows=0 loops=2)

  • Recheck Cond: ((metric_collection_period_id = '66474'::bigint) AND ((processing_status)::text = 'UNPROCESSED'::text))
6. 0.001 0.013 ↓ 0.0 0 1

BitmapAnd (cost=2,593.47..2,593.47 rows=138 width=0) (actual time=0.013..0.013 rows=0 loops=1)

7. 0.012 0.012 ↓ 0.0 0 1

Bitmap Index Scan on u_icr_met_coll_period_id_201910 (cost=0.00..1,171.39 rows=101,043 width=0) (actual time=0.012..0.012 rows=0 loops=1)

  • Index Cond: (metric_collection_period_id = '66474'::bigint)
8. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on i_icr_processing_status_201910 (cost=0.00..1,421.76 rows=109,226 width=0) (never executed)

  • Index Cond: ((processing_status)::text = 'UNPROCESSED'::text)
9. 73.749 73.749 ↓ 80.3 51,458 2

Parallel Index Scan using u_icr_met_coll_period_id_201911 on internal_cost_records_201911 icr_1 (cost=0.43..1,721.39 rows=641 width=190) (actual time=0.013..73.749 rows=51,458 loops=2)

  • Index Cond: (metric_collection_period_id = '66474'::bigint)
  • Filter: ((processing_status)::text = 'UNPROCESSED'::text)
10. 0.002 0.002 ↓ 0.0 0 2

Parallel Index Scan using u_icr_met_coll_period_id_201912 on internal_cost_records_201912 icr_2 (cost=0.14..2.15 rows=1 width=1,360) (actual time=0.002..0.002 rows=0 loops=2)

  • Index Cond: (metric_collection_period_id = '66474'::bigint)
  • Filter: ((processing_status)::text = 'UNPROCESSED'::text)
11. 0.006 8.490 ↓ 0.0 0 102,916

Append (cost=0.69..4.79 rows=5 width=106) (actual time=8.490..8.490 rows=0 loops=102,916)

12. 0.004 0.004 ↓ 0.0 0 102,916

Index Scan using u_cmr_date_prd_cost_typ_id_own_201910 on customer_metric_records_201910 cmr (cost=0.69..2.73 rows=1 width=106) (actual time=0.004..0.004 rows=0 loops=102,916)

  • Index Cond: ((icr.effective_date = effective_date) AND (icr.metric_collection_period_id = metric_collection_period_id) AND (metric_collection_period_id = '66474'::bigint) AND ((icr.cost_usage_type)::text = (cost_usage_type)::text) AND ((icr.resource_type)::text = (resource_type)::text) AND (icr.resource_id =
  • Filter: ((CASE WHEN ((icr.request_id)::text = (request_id)::text) THEN '1'::text ELSE '0'::text END)::integer = 1)
13. 8.476 8.476 ↓ 0.0 0 102,916

Index Scan using i_cmr_met_coll_period_id_201911 on customer_metric_records_201911 cmr_1 (cost=0.43..1.49 rows=1 width=105) (actual time=8.476..8.476 rows=0 loops=102,916)

  • Index Cond: (metric_collection_period_id = '66474'::bigint)
  • Filter: ((icr.metric_collection_period_id = metric_collection_period_id) AND (icr.resource_id = resource_id) AND ((icr.resource_type)::text = (resource_type)::text) AND ((icr.cost_usage_type)::text = (cost_usage_type)::text) AND (icr.effective_date = effective_date) AND ((CASE WHEN ((icr.request_id)::text = (request_id)::text) THEN '1'::text ELSE '0'::text END)::integer = 1))
14. 0.002 0.002 ↓ 0.0 0 102,916

Index Scan using u_cmr_date_prd_cost_typ_id_own_201912 on customer_metric_records_201912 cmr_2 (cost=0.14..0.19 rows=1 width=734) (actual time=0.002..0.002 rows=0 loops=102,916)

  • Index Cond: ((icr.effective_date = effective_date) AND (icr.metric_collection_period_id = metric_collection_period_id) AND (metric_collection_period_id = '66474'::bigint) AND ((icr.cost_usage_type)::text = (cost_usage_type)::text) AND ((icr.resource_type)::text = (resource_type)::text) AND (icr.resource_id = resource_id))
  • Filter: ((CASE WHEN ((icr.request_id)::text = (request_id)::text) THEN '1'::text ELSE '0'::text END)::integer = 1)
15. 0.001 0.001 ↓ 0.0 0 102,916

Index Scan using u_cmr_date_prd_cost_typ_id_own_202001 on customer_metric_records_202001 cmr_3 (cost=0.14..0.19 rows=1 width=734) (actual time=0.001..0.001 rows=0 loops=102,916)

  • Index Cond: ((icr.effective_date = effective_date) AND (icr.metric_collection_period_id = metric_collection_period_id) AND (metric_collection_period_id = '66474'::bigint) AND ((icr.cost_usage_type)::text = (cost_usage_type)::text) AND ((icr.resource_type)::text = (resource_type)::text) AND (icr.resource_id = resource_id))
  • Filter: ((CASE WHEN ((icr.request_id)::text = (request_id)::text) THEN '1'::text ELSE '0'::text END)::integer = 1)
16. 0.001 0.001 ↓ 0.0 0 102,916

Index Scan using u_cmr_date_prd_cost_typ_id_own_202002 on customer_metric_records_202002 cmr_4 (cost=0.14..0.19 rows=1 width=734) (actual time=0.001..0.001 rows=0 loops=102,916)

  • Index Cond: ((icr.effective_date = effective_date) AND (icr.metric_collection_period_id = metric_collection_period_id) AND (metric_collection_period_id = '66474'::bigint) AND ((icr.cost_usage_type)::text = (cost_usage_type)::text) AND ((icr.resource_type)::text = (resource_type)::text) AND (icr.resource_id = resource_id))
  • Filter: ((CASE WHEN ((icr.request_id)::text = (request_id)::text) THEN '1'::text ELSE '0'::text END)::integer = 1)
17. 411.664 411.664 ↑ 1.0 1 102,916

Index Only Scan using pk_bcut_cost_usage_type on billable_cost_usage_types bcut (cost=0.14..0.16 rows=1 width=26) (actual time=0.004..0.004 rows=1 loops=102,916)

  • Index Cond: (cost_usage_type = (icr.cost_usage_type)::text)