explain.depesz.com

PostgreSQL's explain analyze made readable

Result: b53v

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 57,372.028 ↓ 0.0 0 1

Unique (cost=1,385,307.78..1,385,534.87 rows=45,418 width=112) (actual time=57,372.028..57,372.028 rows=0 loops=1)

2.          

Initplan (for Unique)

3. 22.554 12,682.527 ↑ 1.0 1 1

Aggregate (cost=543,343.82..543,343.83 rows=1 width=8) (actual time=12,682.527..12,682.527 rows=1 loops=1)

4. 12,659.973 12,659.973 ↑ 1.1 262,097 1

Index Scan using core_contact_control_system_process_indx on core_contact_control core_contact_control_1 (cost=0.57..542,631.02 rows=285,120 width=8) (actual time=4.600..12,659.973 rows=262,097 loops=1)

  • Index Cond: ((system_process)::text = 'I172_core_contact_sector_specific_demographic_response'::text)
  • Filter: ((process_flag)::text = 'PP'::text)
  • Rows Removed by Filter: 262,097
5. 0.004 57,372.027 ↓ 0.0 0 1

Sort (cost=841,963.95..842,077.49 rows=45,418 width=112) (actual time=57,372.027..57,372.027 rows=0 loops=1)

  • Sort Key: cth.contact_id
  • Sort Method: quicksort Memory: 25kB
6. 0.119 57,372.023 ↓ 0.0 0 1

Nested Loop Semi Join (cost=641,496.63..836,940.65 rows=45,418 width=112) (actual time=57,372.023..57,372.023 rows=0 loops=1)

7. 412.394 44,597.367 ↑ 1,248.6 113 1

Hash Join (cost=641,496.07..717,686.86 rows=141,095 width=16) (actual time=42,571.376..44,597.367 rows=113 loops=1)

  • Hash Cond: (cipsdmrs.contact_transaction_id = cth.contact_transaction_id)
8. 1,888.138 1,888.138 ↑ 1.0 2,086,153 1

Index Only Scan using staging_contact_sector_specific_demographic_response_transactio on staging_contact_sector_specific_demographic_response cipsdmrs (cost=0.43..45,871.50 rows=2,123,405 width=8) (actual time=0.019..1,888.138 rows=2,086,153 loops=1)

  • Heap Fetches: 317,110
9. 19.851 42,296.835 ↑ 8.2 90,114 1

Hash (cost=627,847.85..627,847.85 rows=743,343 width=24) (actual time=42,296.835..42,296.835 rows=90,114 loops=1)

  • Buckets: 65,536 Batches: 16 Memory Usage: 840kB
10. 918.001 42,276.984 ↑ 8.2 90,114 1

Merge Join (cost=34,519.04..627,847.85 rows=743,343 width=24) (actual time=219.513..42,276.984 rows=90,114 loops=1)

  • Merge Cond: (drv.contact_id = cth.contact_id)
11. 6,378.726 6,378.726 ↑ 7.1 90,116 1

Index Only Scan using core_contact_driver_all_temp_contact_id_idx on core_contact_driver_all_temp drv (cost=0.42..24,406.57 rows=636,943 width=8) (actual time=0.006..6,378.726 rows=90,116 loops=1)

  • Heap Fetches: 1,152,403
12. 34,980.257 34,980.257 ↓ 1.0 11,221,901 1

Index Scan using contact_transaction_history_contact_id_idx on contact_transaction_history cth (cost=0.43..592,350.00 rows=11,186,904 width=16) (actual time=0.019..34,980.257 rows=11,221,901 loops=1)

13. 12,774.537 12,774.537 ↓ 0.0 0 113

Index Scan using ix_core_contact_control_cntid_flag_process on core_contact_control (cost=0.57..0.84 rows=1 width=8) (actual time=113.049..113.049 rows=0 loops=113)

  • Index Cond: ((contact_id = cth.contact_id) AND ((process_flag)::text = 'CP'::text) AND ((system_process)::text = 'I120_core_contact_session_history'::text))
  • Filter: (activity_time > COALESCE($0, '1900-01-01 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 1