explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pH2Y : Optimization for: Test_Query; plan #8IRJ

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 422,964.081 ↓ 0.0 0 1

Nested Loop (cost=5,579,178.29..5,591,056.93 rows=2,005 width=158) (actual time=422,964.081..422,964.081 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, contacts.classic_urn, contacts.last_name, contacts.first_name, (((reps.last_name)::text || ' '::text) || (reps.first_name)::text), cp_1.market_value, cp_1.quantity, cp_1.quantity, cp_1.market_value, custodial_securities.symbol, custodial_securities.cusip
  • Buffers: shared hit=15653138 read=9022690 dirtied=272436 written=251804, temp read=140431 written=149850
2. 0.000 422,964.081 ↓ 0.0 0 1

Nested Loop (cost=5,579,177.73..5,585,415.18 rows=1,246 width=182) (actual time=422,964.081..422,964.081 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, contacts.classic_urn, contacts.last_name, contacts.first_name, reps.last_name, reps.first_name, custodial_securities.symbol, custodial_securities.cusip, account_forms_collections_accounts_join.contact_id, contacts_accounts.id, addresses.owner_id
  • Buffers: shared hit=15653138 read=9022690 dirtied=272436 written=251804, temp read=140431 written=149850
3. 0.003 422,964.081 ↓ 0.0 0 1

Merge Join (cost=5,579,177.18..5,580,016.01 rows=1,122 width=174) (actual time=422,964.081..422,964.081 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, contacts.classic_urn, contacts.last_name, contacts.first_name, reps.last_name, reps.first_name, custodial_securities.symbol, custodial_securities.cusip, account_forms_collections_accounts_join.contact_id, contacts_accounts.id
  • Merge Cond: (contacts_accounts.owner_id = classic_users.id)
  • Buffers: shared hit=15653138 read=9022690 dirtied=272436 written=251804, temp read=140431 written=149850
4. 0.009 422,964.078 ↓ 0.0 0 1

Sort (cost=5,579,176.53..5,579,179.34 rows=1,125 width=182) (actual time=422,964.078..422,964.078 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, contacts.classic_urn, contacts.last_name, contacts.first_name, reps.last_name, reps.first_name, custodial_securities.symbol, custodial_securities.cusip, account_forms_collections_accounts_join.contact_id, contacts_accounts.id, contacts_accounts.owner_id
  • Sort Key: contacts_accounts.owner_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=15653138 read=9022690 dirtied=272436 written=251804, temp read=140431 written=149850
5. 0.014 422,964.069 ↓ 0.0 0 1

Hash Join (cost=5,550,205.86..5,579,119.51 rows=1,125 width=182) (actual time=422,964.069..422,964.069 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, contacts.classic_urn, contacts.last_name, contacts.first_name, reps.last_name, reps.first_name, custodial_securities.symbol, custodial_securities.cusip, account_forms_collections_accounts_join.contact_id, contacts_accounts.id, contacts_accounts.owner_id
  • Hash Cond: (rep_codes_contacts_join.rep_id = reps_contacts.id)
  • Buffers: shared hit=15653138 read=9022690 dirtied=272436 written=251804, temp read=140431 written=149850
6. 0.001 422,914.869 ↓ 0.0 0 1

Nested Loop (cost=5,548,667.19..5,577,552.79 rows=1,680 width=190) (actual time=422,914.869..422,914.869 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, contacts.classic_urn, contacts.last_name, contacts.first_name, reps.last_name, reps.first_name, custodial_securities.symbol, custodial_securities.cusip, account_forms_collections_accounts_join.contact_id, contacts_accounts.id, contacts_accounts.owner_id, rep_codes_contacts_join.rep_id
  • Buffers: shared hit=15653137 read=9021448 dirtied=272436 written=251804, temp read=140431 written=149850
7. 0.002 422,914.868 ↓ 0.0 0 1

Nested Loop (cost=5,548,666.62..5,553,289.61 rows=466 width=198) (actual time=422,914.868..422,914.868 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, contacts.classic_urn, contacts.last_name, contacts.first_name, reps.last_name, reps.first_name, custodial_securities.symbol, custodial_securities.cusip, positions_collections.id, account_forms_collections_accounts_join.contact_id, contacts_accounts.id, contacts_accounts.owner_id, rep_codes_contacts_join.rep_id
  • Buffers: shared hit=15653137 read=9021448 dirtied=272436 written=251804, temp read=140431 written=149850
8. 0.000 422,914.866 ↓ 0.0 0 1

Nested Loop (cost=5,548,666.05..5,551,319.23 rows=5 width=200) (actual time=422,914.866..422,914.866 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, accounts.account_number, contacts.classic_urn, contacts.last_name, contacts.first_name, reps.last_name, reps.first_name, custodial_securities.symbol, custodial_securities.cusip, account_forms_collections_accounts_join.contact_id, contacts_accounts.id, contacts_accounts.owner_id, rep_codes_contacts_join.rep_id
  • Buffers: shared hit=15653137 read=9021448 dirtied=272436 written=251804, temp read=140431 written=149850
9. 0.002 422,914.866 ↓ 0.0 0 1

Nested Loop (cost=5,548,665.76..5,551,279.25 rows=5 width=200) (actual time=422,914.866..422,914.866 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, accounts.account_number, contacts.classic_urn, contacts.last_name, contacts.first_name, reps.last_name, reps.first_name, custodial_securities.symbol, custodial_securities.cusip, account_forms_collections_accounts_join.contact_id, contacts_accounts.id, contacts_accounts.owner_id, rep_code_mappings_contacts_join.rep_code_id
  • Buffers: shared hit=15653137 read=9021448 dirtied=272436 written=251804, temp read=140431 written=149850
10. 0.000 422,914.864 ↓ 0.0 0 1

Nested Loop (cost=5,548,665.48..5,551,231.42 rows=6 width=200) (actual time=422,914.864..422,914.864 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, accounts.account_number, contacts.classic_urn, contacts.last_name, contacts.first_name, reps.last_name, reps.first_name, custodial_securities.symbol, custodial_securities.cusip, account_forms_collections_accounts_join.contact_id, contacts_accounts.id, contacts_accounts.rep_code_mapping_id, contacts_accounts.owner_id
  • Buffers: shared hit=15653137 read=9021448 dirtied=272436 written=251804, temp read=140431 written=149850
11. 0.001 422,914.864 ↓ 0.0 0 1

Nested Loop (cost=5,548,661.20..5,551,181.59 rows=6 width=176) (actual time=422,914.864..422,914.864 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, accounts.account_number, contacts.classic_urn, contacts.last_name, contacts.first_name, reps.last_name, reps.first_name, custodial_securities.symbol, custodial_securities.cusip, account_forms_collections_accounts_join.contact_id
  • Join Filter: (account_forms_collections.id = account_forms_collections_accounts_join.id)
  • Buffers: shared hit=15653137 read=9021448 dirtied=272436 written=251804, temp read=140431 written=149850
12. 0.001 422,914.863 ↓ 0.0 0 1

Nested Loop (cost=5,548,660.77..5,551,132.67 rows=6 width=184) (actual time=422,914.863..422,914.863 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, accounts.account_forms_collection_id, accounts.account_number, account_forms_collections.id, contacts.classic_urn, contacts.last_name, contacts.first_name, reps.last_name, reps.first_name, custodial_securities.symbol, custodial_securities.cusip
  • Buffers: shared hit=15653137 read=9021448 dirtied=272436 written=251804, temp read=140431 written=149850
13. 0.001 422,914.862 ↓ 0.0 0 1

Nested Loop (cost=5,548,660.49..5,551,071.76 rows=16 width=200) (actual time=422,914.862..422,914.862 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, accounts.account_forms_collection_id, accounts.held_where_id, accounts.account_number, account_forms_collections.id, contacts.classic_urn, contacts.last_name, contacts.first_name, reps.last_name, reps.first_name, custodial_securities.symbol, custodial_securities.cusip, held_wheres.id
  • Join Filter: (custodial_assets.custodial_asset_product_group_id = custodial_asset_product_groups.id)
  • Buffers: shared hit=15653137 read=9021448 dirtied=272436 written=251804, temp read=140431 written=149850
14. 0.000 422,914.861 ↓ 0.0 0 1

Nested Loop (cost=5,548,660.49..5,551,066.97 rows=16 width=208) (actual time=422,914.861..422,914.861 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, accounts.account_forms_collection_id, accounts.held_where_id, accounts.account_number, account_forms_collections.id, contacts.classic_urn, contacts.last_name, contacts.first_name, reps.last_name, reps.first_name, custodial_securities.symbol, custodial_securities.cusip, custodial_assets.custodial_asset_product_group_id, held_wheres.id
  • Buffers: shared hit=15653137 read=9021448 dirtied=272436 written=251804, temp read=140431 written=149850
15. 0.000 422,914.861 ↓ 0.0 0 1

Nested Loop (cost=5,548,660.22..5,550,960.76 rows=16 width=208) (actual time=422,914.861..422,914.861 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, accounts.account_forms_collection_id, accounts.held_where_id, accounts.account_number, account_forms_collections.id, contacts.classic_urn, contacts.last_name, contacts.first_name, reps.last_name, reps.first_name, custodial_securities.symbol, custodial_securities.cusip, custodial_securities.custodial_asset_id, held_wheres.id
  • Buffers: shared hit=15653137 read=9021448 dirtied=272436 written=251804, temp read=140431 written=149850
16. 0.002 422,914.861 ↓ 0.0 0 1

Nested Loop (cost=5,548,659.80..5,550,830.44 rows=16 width=196) (actual time=422,914.861..422,914.861 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, accounts.account_forms_collection_id, accounts.held_where_id, accounts.account_number, account_forms_collections.id, contacts.classic_urn, contacts.last_name, contacts.first_name, reps.last_name, reps.first_name, custodial_transactions.custodial_security_id, held_wheres.id
  • Buffers: shared hit=15653137 read=9021448 dirtied=272436 written=251804, temp read=140431 written=149850
17. 0.000 422,914.859 ↓ 0.0 0 1

Nested Loop (cost=5,548,659.23..5,548,695.68 rows=1 width=204) (actual time=422,914.859..422,914.859 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, custodial_accounts.id, b.id, accounts.account_forms_collection_id, accounts.held_where_id, accounts.account_number, account_forms_collections.id, contacts.classic_urn, contacts.last_name, contacts.first_name, reps.last_name, reps.first_name, held_wheres.id
  • Buffers: shared hit=15653137 read=9021448 dirtied=272436 written=251804, temp read=140431 written=149850
18. 0.000 422,914.859 ↓ 0.0 0 1

Nested Loop (cost=5,548,658.95..5,548,691.71 rows=1 width=196) (actual time=422,914.859..422,914.859 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, custodial_accounts.id, b.id, accounts.account_forms_collection_id, accounts.held_where_id, accounts.account_number, account_forms_collections.id, contacts.classic_urn, contacts.last_name, contacts.first_name, reps.last_name, reps.first_name
  • Join Filter: (accounts.realm_id = realms.id)
  • Buffers: shared hit=15653137 read=9021448 dirtied=272436 written=251804, temp read=140431 written=149850
19. 0.001 422,914.859 ↓ 0.0 0 1

Nested Loop (cost=5,548,658.95..5,548,690.53 rows=1 width=200) (actual time=422,914.859..422,914.859 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, custodial_accounts.id, b.id, accounts.account_forms_collection_id, accounts.realm_id, accounts.held_where_id, accounts.account_number, account_forms_collections.id, contacts.classic_urn, contacts.last_name, contacts.first_name, reps.last_name, reps.first_name
  • Buffers: shared hit=15653137 read=9021448 dirtied=272436 written=251804, temp read=140431 written=149850
20. 0.001 422,914.858 ↓ 0.0 0 1

Nested Loop (cost=5,548,658.67..5,548,682.53 rows=1 width=190) (actual time=422,914.858..422,914.858 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, custodial_accounts.id, b.id, accounts.account_forms_collection_id, accounts.realm_id, accounts.held_where_id, accounts.account_number, account_forms_collections.id, contacts.classic_urn, contacts.last_name, contacts.first_name, rep_codes.rep_id
  • Buffers: shared hit=15653137 read=9021448 dirtied=272436 written=251804, temp read=140431 written=149850
21. 0.001 422,914.857 ↓ 0.0 0 1

Nested Loop (cost=5,548,658.38..5,548,674.54 rows=1 width=190) (actual time=422,914.857..422,914.857 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, custodial_accounts.id, b.id, accounts.account_forms_collection_id, accounts.realm_id, accounts.held_where_id, accounts.account_number, account_forms_collections.id, contacts.classic_urn, contacts.last_name, contacts.first_name, rep_code_mappings.rep_code_id
  • Buffers: shared hit=15653137 read=9021448 dirtied=272436 written=251804, temp read=140431 written=149850
22. 0.001 422,914.856 ↓ 0.0 0 1

Nested Loop (cost=5,548,658.09..5,548,666.22 rows=1 width=190) (actual time=422,914.856..422,914.856 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, custodial_accounts.id, b.id, accounts.account_forms_collection_id, accounts.realm_id, accounts.held_where_id, accounts.account_number, account_forms_collections.id, contacts.classic_urn, contacts.last_name, contacts.first_name, contacts.rep_code_mapping_id
  • Buffers: shared hit=15653137 read=9021448 dirtied=272436 written=251804, temp read=140431 written=149850
23. 84.153 422,914.855 ↓ 0.0 0 1

Merge Join (cost=5,548,657.66..5,548,657.70 rows=1 width=156) (actual time=422,914.855..422,914.855 rows=0 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, custodial_accounts.id, b.id, accounts.account_forms_collection_id, accounts.realm_id, accounts.held_where_id, accounts.account_number, account_forms_collections.id, account_forms_collections.contact_id
  • Merge Cond: (accounts.account_forms_collection_id = account_forms_collections.id)
  • Buffers: shared hit=15653137 read=9021448 dirtied=272436 written=251804, temp read=140431 written=149850
24. 1,332.416 422,827.810 ↓ 131,991.2 527,965 1

Sort (cost=5,548,649.21..5,548,649.22 rows=4 width=140) (actual time=422,656.060..422,827.810 rows=527,965 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, custodial_accounts.id, b.id, accounts.account_forms_collection_id, accounts.realm_id, accounts.held_where_id, accounts.account_number
  • Sort Key: accounts.account_forms_collection_id
  • Sort Method: external merge Disk: 103216kB
  • Buffers: shared hit=15653137 read=9021441 dirtied=272436 written=251804, temp read=140431 written=149850
25. 22.825 421,495.394 ↓ 192,755.2 771,021 1

Nested Loop (cost=5,497,704.30..5,548,649.17 rows=4 width=140) (actual time=409,143.605..421,495.394 rows=771,021 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, custodial_accounts.id, b.id, accounts.account_forms_collection_id, accounts.realm_id, accounts.held_where_id, accounts.account_number
  • Buffers: shared hit=15653137 read=9021441 dirtied=272436 written=251804, temp read=123434 written=128881
26. 416.310 414,533.380 ↓ 192,755.2 771,021 1

Merge Join (cost=5,497,703.87..5,548,616.55 rows=4 width=118) (actual time=409,141.003..414,533.380 rows=771,021 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, custodial_accounts.id, b.id, a.id
  • Merge Cond: (b.id = custodial_accounts.id)
  • Buffers: shared hit=12811351 read=8771429 dirtied=272424 written=250912, temp read=123434 written=128881
27. 395.177 48,549.143 ↑ 1.4 1,487,975 1

Unique (cost=1,676,950.61..1,702,376.75 rows=2,034,091 width=26) (actual time=47,451.338..48,549.143 rows=1,487,975 loops=1)

  • Output: b.id, a.id, a.account_number, b.id
  • Buffers: shared hit=2214327 read=2468440 dirtied=239742 written=231552, temp read=51147 written=51147
28. 3,485.553 48,153.966 ↓ 1.1 2,207,935 1

Sort (cost=1,676,950.61..1,682,035.84 rows=2,034,091 width=26) (actual time=47,451.336..48,153.966 rows=2,207,935 loops=1)

  • Output: b.id, a.id, a.account_number, b.id
  • Sort Key: b.id, a.id, a.account_number
  • Sort Method: external merge Disk: 112248kB
  • Buffers: shared hit=2214327 read=2468440 dirtied=239742 written=231552, temp read=51147 written=51147
29. 4,376.650 44,668.413 ↓ 1.1 2,207,935 1

Merge Join (cost=821,237.05..1,415,151.53 rows=2,034,091 width=26) (actual time=19,869.238..44,668.413 rows=2,207,935 loops=1)

  • Output: b.id, a.id, a.account_number, b.id
  • Merge Cond: ((b.custodial_provider_id = cp.id) AND ((b.number)::text = (a.account_number)::text))
  • Buffers: shared hit=2214327 read=2468440 dirtied=239742 written=231552, temp read=27793 written=27793
30. 12,910.321 12,910.321 ↑ 1.0 3,316,376 1

Index Scan using index_custodial_accounts_on_cusip_num_wh_and_provider on public.custodial_accounts b (cost=0.56..520,211.31 rows=3,363,456 width=28) (actual time=5.305..12,910.321 rows=3,316,376 loops=1)

  • Output: b.id, b.custodial_broker_dealer_id, b.custodial_provider_id, b.custodial_rep_id, b.custodial_account_status_id, b.custodial_account_option_level_id, b.custodial_account_dividend_income_instruction_id, b.custodial_account_proceeds_instruction_id, b.custodial_account_employee_type_id, b.custodial_account_product_type_id, b.custodial_account_registration_type_id, b.restricted, b.custodial_account_restriction_type_id, b.name, b.number, b.retirement_account_type, b.retirement_plan_type, b.closed_on, b.opened_on, b.pending_close_on, b.reactivated_on, b.reopened_on, b.short_name, b.updated_on, b.joint_tenancy_clause, b.margin_agreed, b.last_updated_on, b.as_of_on, b.money_market_fund, b.has_documents, b.where_held, b.birth_date_529, b.erisa, b.pledge, b.fee_based, b.managed, b.reviewed_on, b.network_level, b.discretion_granted, b.options_on_file, b.margin_on_file, b.institutional_code, b.managed_code, b.account_type, b.cusip, b.custodial_account_registration_category_id
  • Filter: (b.cusip IS NULL)
  • Rows Removed by Filter: 1962413
  • Buffers: shared hit=2214319 read=2310997 dirtied=169835 written=161722
31. 279.928 27,381.442 ↑ 1.2 2,935,588 1

Materialize (cost=821,236.49..839,509.26 rows=3,654,554 width=26) (actual time=19,863.916..27,381.442 rows=2,935,588 loops=1)

  • Output: a.id, a.account_number, cp.id
  • Buffers: shared hit=8 read=157443 dirtied=69907 written=69830, temp read=27793 written=27793
32. 23,497.547 27,101.514 ↑ 1.2 2,935,588 1

Sort (cost=821,236.49..830,372.88 rows=3,654,554 width=26) (actual time=19,863.907..27,101.514 rows=2,935,588 loops=1)

  • Output: a.id, a.account_number, cp.id
  • Sort Key: cp.id, a.account_number
  • Sort Method: external merge Disk: 125520kB
  • Buffers: shared hit=8 read=157443 dirtied=69907 written=69830, temp read=27793 written=27793
33. 840.705 3,603.967 ↑ 1.2 2,935,588 1

Hash Join (cost=27.73..247,986.01 rows=3,654,554 width=26) (actual time=1.583..3,603.967 rows=2,935,588 loops=1)

  • Output: a.id, a.account_number, cp.id
  • Hash Cond: ((a.where_held_classic_id)::text = (c.where_held_classic_id)::text)
  • Buffers: shared hit=8 read=157443 dirtied=69907 written=69830
34. 2,761.734 2,761.734 ↑ 1.1 2,416,517 1

Seq Scan on public.accounts a (cost=0.00..184,427.87 rows=2,698,487 width=22) (actual time=0.002..2,761.734 rows=2,416,517 loops=1)

  • Output: a.id, a.realm_id, a.account_forms_collection_id, a.classic_multivalue_position, a.where_held_classic_id, a.held_where_id, a.account_number, a.hidden, a.dirty, a.created_at, a.updated_at, a.form_type, a.acctype, a.acctype_other, a.advisory_bus, a.alt_address_1, a.alt_address_2, a.alt_city_1, a.alt_city_2, a.alt_email_address_1, a.alt_email_address_2, a.alt_first_name_1, a.alt_first_name_2, a.alt_h_phone_1, a.alt_h_phone_2, a.alt_last_name_1, a.alt_last_name_2, a.alt_m_phone_1, a.alt_m_phone_2, a.alt_no_email_1, a.alt_no_email_2, a.alt_relationship_1, a.alt_relationship_2, a.alt_state_1, a.alt_state_2, a.alt_zip_1, a.alt_zip_2, a.backup_withholding, a.balance, a.bal_asof, a.benefactor_name, a.bene_ira_dob, a.bene_ira_dob_rmd, a.bene_ira_dod, a.bene_ira_spousal, a.ben_responsible_individual, a.buy_amt, a.buy_sec, a.b_phone_cont, a.cam_type, a.ca_state, a.ca_term, a.ca_type, a.certif, a.citizen_other_cont, a.city_coverdell_cont, a.ck_amt, a.ck_enc, a.comm_sched, a.company_owner, a.company_phone, a.convert_cash, a.country_coverdell_cont, a.date2_cont, a.dc_name, a.dep_addr, a.dep_amt, a.dep_bus_tel_num, a.dep_first_name, a.dep_last_name, a.dep_sec, a.dep_soc_sec, a.dep_tel_num, a.div_opt, a.email_cont, a.employer_tin, a.f13, a.fatca_code, a.form_print_status, a.gov_id_cont, a.gov_id_expire_cont, a.hsa_account_number, a.id_country_cont, a.init_tran_buy, a.init_tran_dep_cash, a.init_tran_dep_stock, a.init_tran_none, a.init_tran_sell, a.init_tran_trans, a.invest_link, a.invest_time_horizon3, a.marital_cont, a.mmbal, a.mmf, a.number_of_participants, a.num_signers, a.obj0, a.obj1, a.obj2, a.obj3, a.obj4, a.obj5, a.obj6, a.obj7, a.obj8, a.obj9, a.ofac_comp_cont, a.officer, a.open_req_ids, a.open_warning, a.opt_level, a.other_source_of_funds, a.per_stirpes, a.photo_id_copy_cont, a.plan_number, a.pp_via, a.prim_objective_entity, a.prim_objective_raw, a.princ_app, a.question_1, a.question_2, a.relationship_cont, a.rep, a.resident_other_cont, a.resp_ind_rule1, a.resp_ind_rule2, a.resp_ind_rule3, a.risk_tolerance, a.rollover_days, a.rollover_dollars, a.rollover_eligible, a.rollover_percentage, a.roth_type, a.rp_relationship, a.sec_objective, a.sell_amt, a.sell_sec, a.signer, a.simple_date, a.source_of_funds, a.state_coverdell_cont, a.succ_resp_ind_name, a.succ_resp_ind_ssn, a.succ_resp_ind_tel, a.succ_resp_ind_addr, a.succ_resp_ind_city, a.succ_resp_ind_state, a.succ_resp_ind_zip, a.swept, a.tenants1_name, a.tenants1_percent, a.tenants2_name, a.tenants2_percent, a."timestamp", a.tin_type_dep, a.tin_type_succ_resp, a.title, a.trade_level, a.trade_method, a.transfer, a.tran_amt, a.tran_sec, a.us_citizen_cont, a.us_resident_cont, a.vendor_name, a.waive_fee_date, a.wire, a.zip_coverdell_cont, a.open_date, a.account_master_id, a.complete_at_save, a.ca_date, a.business_type, a.fundvision_pp_via, a.fundvision_statements_via, a.fundvision_tax_documents_via, a.fundvision_proxy_comms_via, a.fundvision_prospectuses_via, a.consent_id, a.participant_investments, a.services_ips, a.services_liaison, a.services_reports, a.services_options, a.services_education, a.services_participant_education, a.services_enrollment, a.services_plan_fees, a.services_investment_monitoring, a.acting_capacity, a.invest_stocks, a.invest_mfs, a.invest_va, a.invest_fa, a.invest_life_ins, a.invest_advisory, a.invest_other, a.invest_other_desc, a.firelight_trans_classic_id, a.no_ach, a.private_banking_or_foreign, a.private_banking_or_foreign_information, a.investment_strategy_short_term_growth, a.investment_strategy_long_term_growth, a.investment_strategy_aggressive_growth, a.investment_strategy_growth, a.investment_strategy_growth_income, a.investment_strategy_balanced, a.investment_strategy_balanced_income, a.funding_source_investment_proceeds, a.funding_source_legal_settlement, a.funding_source_gift, a.funding_source_trust_will, a.funding_source_income_from_earnings_savings, a.funding_source_pension_ira_retirement, a.funding_source_spouse_parent, a.funding_source_insurance_proceeds, a.funding_source_other, a.contact_beneficiary_tuition_plan
  • Buffers: shared hit=5 read=157438 dirtied=69907 written=69830
35. 0.103 1.528 ↑ 1.0 605 1

Hash (cost=20.16..20.16 rows=606 width=13) (actual time=1.528..1.528 rows=605 loops=1)

  • Output: c.where_held_classic_id, cp.id
  • Buckets: 1024 Batches: 1 Memory Usage: 29kB
  • Buffers: shared read=5
36. 0.176 1.425 ↑ 1.0 605 1

Hash Join (cost=1.77..20.16 rows=606 width=13) (actual time=0.734..1.425 rows=605 loops=1)

  • Output: c.where_held_classic_id, cp.id
  • Hash Cond: ((c.custodial_provider_name)::text = (cp.name)::text)
  • Buffers: shared read=5
37. 1.227 1.227 ↑ 1.0 606 1

Seq Scan on public.provider_where_held_mapping c (cost=0.00..10.06 rows=606 width=9) (actual time=0.691..1.227 rows=606 loops=1)

  • Output: c.custodial_provider_name, c.fund_company, c.realm, c.where_held_classic_id
  • Buffers: shared read=4
38. 0.008 0.022 ↓ 1.1 36 1

Hash (cost=1.34..1.34 rows=34 width=126) (actual time=0.022..0.022 rows=36 loops=1)

  • Output: cp.id, cp.name
  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
  • Buffers: shared read=1
39. 0.014 0.014 ↓ 1.1 36 1

Seq Scan on public.custodial_providers cp (cost=0.00..1.34 rows=34 width=126) (actual time=0.011..0.014 rows=36 loops=1)

  • Output: cp.id, cp.name
  • Buffers: shared read=1
40. 340.249 365,567.927 ↓ 121,179.7 1,211,797 1

Materialize (cost=3,820,753.26..3,820,813.61 rows=10 width=102) (actual time=361,689.587..365,567.927 rows=1,211,797 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, custodial_accounts.id
  • Buffers: shared hit=10597024 read=6302989 dirtied=32682 written=19360, temp read=72287 written=77734
41. 934.634 365,227.678 ↓ 120,988.7 1,209,887 1

Nested Loop (cost=3,820,753.26..3,820,813.58 rows=10 width=102) (actual time=361,689.581..365,227.678 rows=1,209,887 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, custodial_accounts.id
  • Buffers: shared hit=10597024 read=6302989 dirtied=32682 written=19360, temp read=72287 written=77734
42. 1,789.776 361,873.270 ↓ 120,988.7 1,209,887 1

Sort (cost=3,820,752.83..3,820,752.86 rows=10 width=94) (actual time=361,689.499..361,873.270 rows=1,209,887 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code
  • Sort Key: cp_1.custodial_account_id, cp_1.custodial_security_id
  • Sort Method: external sort Disk: 158720kB
  • Buffers: shared hit=6405071 read=6190052 dirtied=30793 written=18635, temp read=72287 written=77734
43.          

CTE latest_valuations

44. 8,441.559 144,286.921 ↓ 113.0 1,100,619 1

HashAggregate (cost=3,579,920.09..3,580,017.52 rows=9,743 width=12) (actual time=143,631.576..144,286.921 rows=1,100,619 loops=1)

  • Output: cp_2.custodial_account_id, max(cp_2.valued_on)
  • Group Key: cp_2.custodial_account_id
  • Buffers: shared read=383047 dirtied=30530 written=16209
45. 96,960.713 135,845.362 ↓ 1.2 17,577,326 1

Bitmap Heap Scan on public.custodial_positions cp_2 (cost=363,043.88..3,505,467.75 rows=14,890,468 width=12) (actual time=41,036.873..135,845.362 rows=17,577,326 loops=1)

  • Output: cp_2.id, cp_2.custodial_account_id, cp_2.custodial_original_account_id, cp_2.custodial_security_id, cp_2.custodial_job_id, cp_2.quantity, cp_2.market_value, cp_2.segregation, cp_2.legal_quantity, cp_2.safe_quantity, cp_2.transfer_quantity, cp_2.holding_type, cp_2.traded_on, cp_2.valued_on, cp_2.settle_on, cp_2.priced_on, cp_2.short_on, cp_2.status, cp_2.fund_code
  • Recheck Cond: ((cp_2.valued_on > (('now'::cstring)::date - '30 days'::interval)) AND (cp_2.valued_on <= ('now'::cstring)::date))
  • Rows Removed by Index Recheck: 3102893
  • Heap Blocks: exact=42681 lossy=263488
  • Buffers: shared read=383047 dirtied=30530 written=16209
46. 38,884.649 38,884.649 ↓ 1.5 22,187,984 1

Bitmap Index Scan on index_custodial_positions_on_valued_on (cost=0.00..359,321.26 rows=14,890,468 width=0) (actual time=38,884.649..38,884.649 rows=22,187,984 loops=1)

  • Index Cond: ((cp_2.valued_on > (('now'::cstring)::date - '30 days'::interval)) AND (cp_2.valued_on <= ('now'::cstring)::date))
  • Buffers: shared read=76878 written=1
47.          

CTE latest_jobs

48. 905.037 46,712.288 ↓ 50.9 1,100,618 1

HashAggregate (cost=118,379.47..118,595.57 rows=21,610 width=16) (actual time=46,511.708..46,712.288 rows=1,100,618 loops=1)

  • Output: cp_3.custodial_account_id, max(cp_3.custodial_job_id)
  • Group Key: cp_3.custodial_account_id
  • Buffers: shared hit=3225030 read=2879584, temp read=2957 written=1
49. 521.678 45,807.251 ↓ 93.1 2,011,914 1

Nested Loop (cost=0.57..118,271.42 rows=21,610 width=16) (actual time=3.924..45,807.251 rows=2,011,914 loops=1)

  • Output: cp_3.custodial_account_id, cp_3.custodial_job_id
  • Buffers: shared hit=3225030 read=2879584, temp read=2957 written=1
50. 160.194 160.194 ↓ 113.0 1,100,619 1

CTE Scan on latest_valuations lav_1 (cost=0.00..194.86 rows=9,743 width=12) (actual time=3.176..160.194 rows=1,100,619 loops=1)

  • Output: lav_1.custodial_account_id, lav_1.current_account_date
  • Buffers: temp read=2957 written=1
51. 45,125.379 45,125.379 ↑ 1.0 2 1,100,619

Index Scan using index_custodial_positions_on_valued_on_custodial_account_id on public.custodial_positions cp_3 (cost=0.57..12.10 rows=2 width=20) (actual time=0.038..0.041 rows=2 loops=1,100,619)

  • Output: cp_3.id, cp_3.custodial_account_id, cp_3.custodial_original_account_id, cp_3.custodial_security_id, cp_3.custodial_job_id, cp_3.quantity, cp_3.market_value, cp_3.segregation, cp_3.legal_quantity, cp_3.safe_quantity, cp_3.transfer_quantity, cp_3.holding_type, cp_3.traded_on, cp_3.valued_on, cp_3.settle_on, cp_3.priced_on, cp_3.short_on, cp_3.status, cp_3.fund_code
  • Index Cond: ((cp_3.custodial_account_id = lav_1.custodial_account_id) AND (cp_3.valued_on = lav_1.current_account_date))
  • Buffers: shared hit=3225030 read=2879584
52. 826.696 360,083.494 ↓ 195,775.7 1,957,757 1

Merge Join (cost=121,815.33..122,139.58 rows=10 width=94) (actual time=358,444.016..360,083.494 rows=1,957,757 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code
  • Merge Cond: ((cp_1.custodial_account_id = lav.custodial_account_id) AND (cp_1.custodial_job_id = lav.latest_job))
  • Buffers: shared hit=6405071 read=6190052 dirtied=30793 written=18635, temp read=60372 written=57894
53. 4,485.089 311,175.051 ↓ 93.1 2,011,914 1

Sort (cost=119,827.27..119,881.30 rows=21,610 width=102) (actual time=310,563.719..311,175.051 rows=2,011,914 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, lj.custodial_account_id
  • Sort Key: cp_1.custodial_account_id, cp_1.custodial_job_id
  • Sort Method: external merge Disk: 181864kB
  • Buffers: shared hit=3180041 read=3310468 dirtied=30793 written=18635, temp read=43374 written=46329
54. 1,267.554 306,689.962 ↓ 93.1 2,011,914 1

Nested Loop (cost=0.57..118,271.42 rows=21,610 width=102) (actual time=143,633.034..306,689.962 rows=2,011,914 loops=1)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code, lj.custodial_account_id
  • Buffers: shared hit=3180041 read=3310468 dirtied=30793 written=18635, temp written=2955
55. 144,732.034 144,732.034 ↓ 113.0 1,100,619 1

CTE Scan on latest_valuations lj (cost=0.00..194.86 rows=9,743 width=12) (actual time=143,631.581..144,732.034 rows=1,100,619 loops=1)

  • Output: lj.custodial_account_id, lj.current_account_date
  • Buffers: shared read=383047 dirtied=30530 written=16209, temp written=2955
56. 160,690.374 160,690.374 ↑ 1.0 2 1,100,619

Index Scan using index_custodial_positions_on_valued_on_custodial_account_id on public.custodial_positions cp_1 (cost=0.57..12.10 rows=2 width=94) (actual time=0.141..0.146 rows=2 loops=1,100,619)

  • Output: cp_1.id, cp_1.custodial_account_id, cp_1.custodial_original_account_id, cp_1.custodial_security_id, cp_1.custodial_job_id, cp_1.quantity, cp_1.market_value, cp_1.segregation, cp_1.legal_quantity, cp_1.safe_quantity, cp_1.transfer_quantity, cp_1.holding_type, cp_1.traded_on, cp_1.valued_on, cp_1.settle_on, cp_1.priced_on, cp_1.short_on, cp_1.status, cp_1.fund_code
  • Index Cond: ((cp_1.custodial_account_id = lj.custodial_account_id) AND (cp_1.valued_on = lj.current_account_date))
  • Buffers: shared hit=3180041 read=2927421 dirtied=263 written=2426
57. 1,079.365 48,081.747 ↓ 90.6 1,957,757 1

Sort (cost=1,988.06..2,042.08 rows=21,610 width=16) (actual time=47,880.285..48,081.747 rows=1,957,757 loops=1)

  • Output: lav.latest_job, lav.custodial_account_id
  • Sort Key: lav.custodial_account_id, lav.latest_job
  • Sort Method: external sort Disk: 32280kB
  • Buffers: shared hit=3225030 read=2879584, temp read=14013 written=11565
58. 47,002.382 47,002.382 ↓ 50.9 1,100,618 1

CTE Scan on latest_jobs lav (cost=0.00..432.20 rows=21,610 width=16) (actual time=46,511.711..47,002.382 rows=1,100,618 loops=1)

  • Output: lav.latest_job, lav.custodial_account_id
  • Buffers: shared hit=3225030 read=2879584, temp read=2957 written=3494
59. 2,419.774 2,419.774 ↑ 1.0 1 1,209,887

Index Only Scan using custodial_accounts_pkey on public.custodial_accounts (cost=0.43..6.05 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1,209,887)

  • Output: custodial_accounts.id
  • Index Cond: (custodial_accounts.id = cp_1.custodial_account_id)
  • Heap Fetches: 535136
  • Buffers: shared hit=4191953 read=112937 dirtied=1889 written=725
60. 6,939.189 6,939.189 ↑ 1.0 1 771,021

Index Scan using accounts_pkey on public.accounts (cost=0.43..8.14 rows=1 width=38) (actual time=0.008..0.009 rows=1 loops=771,021)

  • Output: accounts.id, accounts.realm_id, accounts.account_forms_collection_id, accounts.classic_multivalue_position, accounts.where_held_classic_id, accounts.held_where_id, accounts.account_number, accounts.hidden, accounts.dirty, accounts.created_at, accounts.updated_at, accounts.form_type, accounts.acctype, accounts.acctype_other, accounts.advisory_bus, accounts.alt_address_1, accounts.alt_address_2, accounts.alt_city_1, accounts.alt_city_2, accounts.alt_email_address_1, accounts.alt_email_address_2, accounts.alt_first_name_1, accounts.alt_first_name_2, accounts.alt_h_phone_1, accounts.alt_h_phone_2, accounts.alt_last_name_1, accounts.alt_last_name_2, accounts.alt_m_phone_1, accounts.alt_m_phone_2, accounts.alt_no_email_1, accounts.alt_no_email_2, accounts.alt_relationship_1, accounts.alt_relationship_2, accounts.alt_state_1, accounts.alt_state_2, accounts.alt_zip_1, accounts.alt_zip_2, accounts.backup_withholding, accounts.balance, accounts.bal_asof, accounts.benefactor_name, accounts.bene_ira_dob, accounts.bene_ira_dob_rmd, accounts.bene_ira_dod, accounts.bene_ira_spousal, accounts.ben_responsible_individual, accounts.buy_amt, accounts.buy_sec, accounts.b_phone_cont, accounts.cam_type, accounts.ca_state, accounts.ca_term, accounts.ca_type, accounts.certif, accounts.citizen_other_cont, accounts.city_coverdell_cont, accounts.ck_amt, accounts.ck_enc, accounts.comm_sched, accounts.company_owner, accounts.company_phone, accounts.convert_cash, accounts.country_coverdell_cont, accounts.date2_cont, accounts.dc_name, accounts.dep_addr, accounts.dep_amt, accounts.dep_bus_tel_num, accounts.dep_first_name, accounts.dep_last_name, accounts.dep_sec, accounts.dep_soc_sec, accounts.dep_tel_num, accounts.div_opt, accounts.email_cont, accounts.employer_tin, accounts.f13, accounts.fatca_code, accounts.form_print_status, accounts.gov_id_cont, accounts.gov_id_expire_cont, accounts.hsa_account_number, accounts.id_country_cont, accounts.init_tran_buy, accounts.init_tran_dep_cash, accounts.init_tran_dep_stock, accounts.init_tran_none, accounts.init_tran_sell, accounts.init_tran_trans, accounts.invest_link, accounts.invest_time_horizon3, accounts.marital_cont, accounts.mmbal, accounts.mmf, accounts.number_of_participants, accounts.num_signers, accounts.obj0, accounts.obj1, accounts.obj2, accounts.obj3, accounts.obj4, accounts.obj5, accounts.obj6, accounts.obj7, accounts.obj8, accounts.obj9, accounts.ofac_comp_cont, accounts.officer, accounts.open_req_ids, accounts.open_warning, accounts.opt_level, accounts.other_source_of_funds, accounts.per_stirpes, accounts.photo_id_copy_cont, accounts.plan_number, accounts.pp_via, accounts.prim_objective_entity, accounts.prim_objective_raw, accounts.princ_app, accounts.question_1, accounts.question_2, accounts.relationship_cont, accounts.rep, accounts.resident_other_cont, accounts.resp_ind_rule1, accounts.resp_ind_rule2, accounts.resp_ind_rule3, accounts.risk_tolerance, accounts.rollover_days, accounts.rollover_dollars, accounts.rollover_eligible, accounts.rollover_percentage, accounts.roth_type, accounts.rp_relationship, accounts.sec_objective, accounts.sell_amt, accounts.sell_sec, accounts.signer, accounts.simple_date, accounts.source_of_funds, accounts.state_coverdell_cont, accounts.succ_resp_ind_name, accounts.succ_resp_ind_ssn, accounts.succ_resp_ind_tel, accounts.succ_resp_ind_addr, accounts.succ_resp_ind_city, accounts.succ_resp_ind_state, accounts.succ_resp_ind_zip, accounts.swept, accounts.tenants1_name, accounts.tenants1_percent, accounts.tenants2_name, accounts.tenants2_percent, accounts."timestamp", accounts.tin_type_dep, accounts.tin_type_succ_resp, accounts.title, accounts.trade_level, accounts.trade_method, accounts.transfer, accounts.tran_amt, accounts.tran_sec, accounts.us_citizen_cont, accounts.us_resident_cont, accounts.vendor_name, accounts.waive_fee_date, accounts.wire, accounts.zip_coverdell_cont, accounts.open_date, accounts.account_master_id, accounts.complete_at_save, accounts.ca_date, accounts.business_type, accounts.fundvision_pp_via, accounts.fundvision_statements_via, accounts.fundvision_tax_documents_via, accounts.fundvision_proxy_comms_via, accounts.fundvision_prospectuses_via, accounts.consent_id, accounts.participant_investments, accounts.services_ips, accounts.services_liaison, accounts.services_reports, accounts.services_options, accounts.services_education, accounts.services_participant_education, accounts.services_enrollment, accounts.services_plan_fees, accounts.services_investment_monitoring, accounts.acting_capacity, accounts.invest_stocks, accounts.invest_mfs, accounts.invest_va, accounts.invest_fa, accounts.invest_life_ins, accounts.invest_advisory, accounts.invest_other, accounts.invest_other_desc, accounts.firelight_trans_classic_id, accounts.no_ach, accounts.private_banking_or_foreign, accounts.private_banking_or_foreign_information, accounts.investment_strategy_short_term_growth, accounts.investment_strategy_long_term_growth, accounts.investment_strategy_aggressive_growth, accounts.investment_strategy_growth, accounts.investment_strategy_growth_income, accounts.investment_strategy_balanced, accounts.investment_strategy_balanced_income, accounts.funding_source_investment_proceeds, accounts.funding_source_legal_settlement, accounts.funding_source_gift, accounts.funding_source_trust_will, accounts.funding_source_income_from_earnings_savings, accounts.funding_source_pension_ira_retirement, accounts.funding_source_spouse_parent, accounts.funding_source_insurance_proceeds, accounts.funding_source_other, accounts.contact_beneficiary_tuition_plan
  • Index Cond: (accounts.id = a.id)
  • Buffers: shared hit=2841786 read=250012 dirtied=12 written=892
61. 0.016 2.892 ↑ 1.0 1 1

Sort (cost=8.46..8.46 rows=1 width=16) (actual time=2.891..2.892 rows=1 loops=1)

  • Output: account_forms_collections.id, account_forms_collections.contact_id
  • Sort Key: account_forms_collections.id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared read=7
62. 2.876 2.876 ↑ 1.0 1 1

Index Scan using index_account_forms_collections_on_contact_id on public.account_forms_collections (cost=0.43..8.45 rows=1 width=16) (actual time=2.875..2.876 rows=1 loops=1)

  • Output: account_forms_collections.id, account_forms_collections.contact_id
  • Index Cond: (account_forms_collections.contact_id = 103850)
  • Buffers: shared read=7
63. 0.000 0.000 ↓ 0.0 0

Index Scan using contacts_pkey on public.contacts (cost=0.43..8.51 rows=1 width=50) (never executed)

  • Output: contacts.classic_urn, contacts.last_name, contacts.first_name, contacts.id, contacts.rep_code_mapping_id
  • Index Cond: (contacts.id = 103850)
64. 0.000 0.000 ↓ 0.0 0

Index Scan using rep_code_mappings_pkey on public.rep_code_mappings (cost=0.29..8.31 rows=1 width=16) (never executed)

  • Output: rep_code_mappings.id, rep_code_mappings.realm_id, rep_code_mappings.code, rep_code_mappings.rep_code_id, rep_code_mappings.deleted, rep_code_mappings.created_at, rep_code_mappings.updated_at, rep_code_mappings.classic_urn, rep_code_mappings.classic_record_id, rep_code_mappings.dirty, rep_code_mappings.workgroup_id
  • Index Cond: (rep_code_mappings.id = contacts.rep_code_mapping_id)
65. 0.000 0.000 ↓ 0.0 0

Index Scan using rep_codes_pkey on public.rep_codes (cost=0.29..7.98 rows=1 width=16) (never executed)

  • Output: rep_codes.id, rep_codes.realm_id, rep_codes.rep_urn, rep_codes.rep_id, rep_codes.contact_urn, rep_codes.code, rep_codes.created_at, rep_codes.updated_at, rep_codes.classic_urn, rep_codes.classic_record_id, rep_codes.dirty, rep_codes.deleted, rep_codes.inactive, rep_codes.product_type_code, rep_codes.rep_type_code, rep_codes.abnormal_code, rep_codes.ssn_default_rep, rep_codes.house_flag, rep_codes.sec36_flag, rep_codes.prim_rep_code, rep_codes.vendor_ids, rep_codes.contact_classic_id, rep_codes.contact_id, rep_codes.description, rep_codes.tier_class_code
  • Index Cond: (rep_codes.id = rep_code_mappings.rep_code_id)
66. 0.000 0.000 ↓ 0.0 0

Index Scan using reps_pkey on public.reps (cost=0.29..7.98 rows=1 width=26) (never executed)

  • Output: reps.id, reps.realm_id, reps.owner_urn, reps.owner_id, reps.branch_urn, reps.branch_id, reps.created_at, reps.updated_at, reps.classic_urn, reps.classic_record_id, reps.dirty, reps.creator_contact_urn, reps.creator_id, reps.hidden, reps.add_branch, reps.alt_osj_classic_ids, reps.assist_by, reps.assist_to, reps.cam_qualified, reps.company_data, reps.crd_registration, reps.creator_contact_id, reps.customer, reps.disclosure_date, reps.primary_email, reps.email_list, reps.employment_type, reps.family_id, reps.fingerprint, reps.first_name, reps.fo_users, reps.ia_qualified, reps.include_in_export, reps.include_in_sync, reps.jumbled_flag, reps.keywords, reps.last_name, reps.merged, reps.need_disclosure, reps.need_review, reps.nickname, reps.npn_registration, reps.old_created_at, reps.owner, reps.peripherals, reps.privacy_disagree, reps.prof_designation, reps.refer_to, reps.reg_rep_bak, reps.reg_status, reps.reg_status_date, reps.reg_type, reps.review_date, reps.salutation, reps.sec36_excluded, reps.standing, reps.supp_title, reps.term_date, reps.term_reason, reps."timestamp", reps.title, reps.track_num, reps.tax_id, reps.privacy_code, reps.is_restricted, reps.type_code, reps.territory_code, reps.status_code, reps.class_code, reps.mailing_address_type, reps.registration_address_type, reps.address_type_coholder, reps.organization, reps.division, reps.department, reps.cg_rep_id
  • Index Cond: (reps.id = rep_codes.rep_id)
  • Filter: ((reps.classic_urn)::text = 'Rep:cfs-registration:1448'::text)
67. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.realms (cost=0.00..1.08 rows=8 width=8) (never executed)

  • Output: realms.id, realms.code, realms.name
68. 0.000 0.000 ↓ 0.0 0

Index Only Scan using held_wheres_pkey on public.held_wheres (cost=0.28..3.96 rows=1 width=8) (never executed)

  • Output: held_wheres.id
  • Index Cond: (held_wheres.id = accounts.held_where_id)
  • Heap Fetches: 0
69. 0.000 0.000 ↓ 0.0 0

Index Scan using index_custodial_transactions_on_custodial_account_id on public.custodial_transactions (cost=0.57..2,126.02 rows=874 width=16) (never executed)

  • Output: custodial_transactions.id, custodial_transactions.custodial_account_id, custodial_transactions.custodial_job_id, custodial_transactions.custodial_security_id, custodial_transactions.custodial_transaction_type_id, custodial_transactions.source_record_identifier, custodial_transactions.traded_on, custodial_transactions.quantity, custodial_transactions.price, custodial_transactions.gross_amount, custodial_transactions.net_amount, custodial_transactions.description, custodial_transactions.purchase_or_sale, custodial_transactions.cancel_or_rebill, custodial_transactions.cdsc_amount, custodial_transactions.commission_amount, custodial_transactions.concession_amount, custodial_transactions.execution_time, custodial_transactions.markup_rate, custodial_transactions.open_or_close, custodial_transactions.order_number, custodial_transactions.trade_number, custodial_transactions.principal_trade, custodial_transactions.product_exchange, custodial_transactions.execution_rep_code, custodial_transactions.roa_loi_amt, custodial_transactions.sales_load_rate, custodial_transactions.solicited, custodial_transactions.syndicate, custodial_transactions.systematic, custodial_transactions.quantity_polarity, custodial_transactions.price_polarity, custodial_transactions.gross_amount_polarity
  • Index Cond: (custodial_transactions.custodial_account_id = custodial_accounts.id)
70. 0.000 0.000 ↓ 0.0 0

Index Scan using custodial_securities_pkey on public.custodial_securities (cost=0.42..8.13 rows=1 width=28) (never executed)

  • Output: custodial_securities.id, custodial_securities.custodial_job_id, custodial_securities.custodial_provider_id, custodial_securities.custodial_asset_id, custodial_securities.symbol, custodial_securities.cusip, custodial_securities.fund, custodial_securities.sub_fund, custodial_securities.description, custodial_securities.full_description, custodial_securities.holding_type, custodial_securities.interest_frequency, custodial_securities.security_class, custodial_securities.factor, custodial_securities.round_lot_quantity, custodial_securities.underlying_security, custodial_securities.sap_rating, custodial_securities.coupon_rate, custodial_securities.expire_on, custodial_securities.dated_on, custodial_securities.first_coupon_on, custodial_securities.minor_product, custodial_securities.structured_product, custodial_securities.call_or_put, custodial_securities.muni_state, custodial_securities.option_multiplier, custodial_securities.primary_exchange, custodial_securities.rating_secondary, custodial_securities.surrender_charge_period
  • Index Cond: (custodial_securities.id = custodial_transactions.custodial_security_id)
71. 0.000 0.000 ↓ 0.0 0

Index Scan using custodial_assets_pkey on public.custodial_assets (cost=0.28..6.63 rows=1 width=16) (never executed)

  • Output: custodial_assets.id, custodial_assets.custodial_asset_class_id, custodial_assets.custodial_asset_product_group_id, custodial_assets.custodial_asset_product_subgroup_id, custodial_assets.code, custodial_assets.description
  • Index Cond: (custodial_assets.id = custodial_securities.custodial_asset_id)
72. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1.22 rows=15 width=8) (never executed)

  • Output: custodial_asset_product_groups.id
73. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.custodial_asset_product_groups (cost=0.00..1.15 rows=15 width=8) (never executed)

  • Output: custodial_asset_product_groups.id
74. 0.000 0.000 ↓ 0.0 0

Index Only Scan using index_data_sources_on_held_where_id on public.data_sources (cost=0.28..3.80 rows=1 width=8) (never executed)

  • Output: data_sources.held_where_id
  • Index Cond: (data_sources.held_where_id = held_wheres.id)
  • Heap Fetches: 0
75. 0.000 0.000 ↓ 0.0 0

Index Scan using account_forms_collections_pkey on public.account_forms_collections account_forms_collections_accounts_join (cost=0.43..8.14 rows=1 width=16) (never executed)

  • Output: account_forms_collections_accounts_join.id, account_forms_collections_accounts_join.contact_id, account_forms_collections_accounts_join.update_timestamps, account_forms_collections_accounts_join.created_at, account_forms_collections_accounts_join.updated_at, account_forms_collections_accounts_join.classic_urn, account_forms_collections_accounts_join.classic_record_id, account_forms_collections_accounts_join.dirty, account_forms_collections_accounts_join.realm_id
  • Index Cond: (account_forms_collections_accounts_join.id = accounts.account_forms_collection_id)
76. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on public.contacts contacts_accounts (cost=4.28..8.29 rows=1 width=24) (never executed)

  • Output: contacts_accounts.id, contacts_accounts.rep_code_mapping_id, contacts_accounts.owner_id
  • Recheck Cond: (contacts_accounts.id = account_forms_collections_accounts_join.contact_id)
77. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on contacts_pkey (cost=0.00..4.28 rows=1 width=0) (never executed)

  • Index Cond: (contacts_accounts.id = account_forms_collections_accounts_join.contact_id)
78. 0.000 0.000 ↓ 0.0 0

Index Scan using rep_code_mappings_pkey on public.rep_code_mappings rep_code_mappings_contacts_join (cost=0.29..7.96 rows=1 width=16) (never executed)

  • Output: rep_code_mappings_contacts_join.id, rep_code_mappings_contacts_join.realm_id, rep_code_mappings_contacts_join.code, rep_code_mappings_contacts_join.rep_code_id, rep_code_mappings_contacts_join.deleted, rep_code_mappings_contacts_join.created_at, rep_code_mappings_contacts_join.updated_at, rep_code_mappings_contacts_join.classic_urn, rep_code_mappings_contacts_join.classic_record_id, rep_code_mappings_contacts_join.dirty, rep_code_mappings_contacts_join.workgroup_id
  • Index Cond: (rep_code_mappings_contacts_join.id = contacts_accounts.rep_code_mapping_id)
79. 0.000 0.000 ↓ 0.0 0

Index Scan using rep_codes_pkey on public.rep_codes rep_codes_contacts_join (cost=0.29..7.98 rows=1 width=16) (never executed)

  • Output: rep_codes_contacts_join.id, rep_codes_contacts_join.realm_id, rep_codes_contacts_join.rep_urn, rep_codes_contacts_join.rep_id, rep_codes_contacts_join.contact_urn, rep_codes_contacts_join.code, rep_codes_contacts_join.created_at, rep_codes_contacts_join.updated_at, rep_codes_contacts_join.classic_urn, rep_codes_contacts_join.classic_record_id, rep_codes_contacts_join.dirty, rep_codes_contacts_join.deleted, rep_codes_contacts_join.inactive, rep_codes_contacts_join.product_type_code, rep_codes_contacts_join.rep_type_code, rep_codes_contacts_join.abnormal_code, rep_codes_contacts_join.ssn_default_rep, rep_codes_contacts_join.house_flag, rep_codes_contacts_join.sec36_flag, rep_codes_contacts_join.prim_rep_code, rep_codes_contacts_join.vendor_ids, rep_codes_contacts_join.contact_classic_id, rep_codes_contacts_join.contact_id, rep_codes_contacts_join.description, rep_codes_contacts_join.tier_class_code
  • Index Cond: (rep_codes_contacts_join.id = rep_code_mappings_contacts_join.rep_code_id)
80. 0.000 0.000 ↓ 0.0 0

Index Scan using index_positions_collections_on_account_number on public.positions_collections (cost=0.56..393.07 rows=101 width=22) (never executed)

  • Output: positions_collections.account_number, positions_collections.id
  • Index Cond: ((positions_collections.account_number)::text = (accounts.account_number)::text)
81. 0.000 0.000 ↓ 0.0 0

Index Only Scan using index_positions_on_positions_collection_id on public.positions (cost=0.57..42.46 rows=961 width=8) (never executed)

  • Output: positions.positions_collection_id
  • Index Cond: (positions.positions_collection_id = positions_collections.id)
  • Heap Fetches: 0
82. 2.105 49.186 ↑ 1.0 13,141 1

Hash (cost=1,374.41..1,374.41 rows=13,141 width=8) (actual time=49.186..49.186 rows=13,141 loops=1)

  • Output: reps_contacts.id
  • Buckets: 2048 Batches: 1 Memory Usage: 514kB
  • Buffers: shared hit=1 read=1242
83. 47.081 47.081 ↑ 1.0 13,141 1

Seq Scan on public.reps reps_contacts (cost=0.00..1,374.41 rows=13,141 width=8) (actual time=0.720..47.081 rows=13,141 loops=1)

  • Output: reps_contacts.id
  • Buffers: shared hit=1 read=1242
84. 0.000 0.000 ↓ 0.0 0

Index Only Scan using classic_users_pkey on public.classic_users (cost=0.29..770.59 rows=22,820 width=8) (never executed)

  • Output: classic_users.id
  • Heap Fetches: 0
85. 0.000 0.000 ↓ 0.0 0

Index Only Scan using index_addresses_on_owner_type_kind_and_position on public.addresses (cost=0.56..4.78 rows=3 width=8) (never executed)

  • Output: addresses.owner_type, addresses.owner_id, addresses.type, addresses.kind, addresses.classic_multivalue_position
  • Index Cond: ((addresses.owner_type = 'Contacts::Contact'::text) AND (addresses.owner_id = contacts_accounts.id))
  • Filter: ((addresses.type)::text = ANY ('{Contacts::Address,Org::ProgramAddress,Org::BranchAddress,Org::RepAddress}'::text[]))
  • Heap Fetches: 0
86. 0.000 0.000 ↓ 0.0 0

Index Only Scan using index_phones_on_owner_type_and_owner_id on public.phones (cost=0.56..4.49 rows=3 width=8) (never executed)

  • Output: phones.owner_type, phones.owner_id
  • Index Cond: ((phones.owner_type = 'Contacts::Contact'::text) AND (phones.owner_id = contacts_accounts.id))
  • Heap Fetches: 0
Planning time : 183.664 ms
Execution time : 423,111.544 ms