explain.depesz.com

PostgreSQL's explain analyze made readable

Result: F1tB

Settings
# exclusive inclusive rows x rows loops node
1. 188.797 1,154.448 ↓ 7,187.0 7,187 1

GroupAggregate (cost=598.08..598.65 rows=1 width=516) (actual time=958.109..1,154.448 rows=7,187 loops=1)

  • Output: ah.id, ah.cid, ah.ap_payee_id, ah.ap_header_sub_type_id, ah.ap_payee_term_id, ah.lease_customer_id, ah.ap_payment_id, ah.po_ap_header_ids, ah.reversal_ap_header_id, ah.refund_ar_transaction_id, ah.transaction_datetime, ah.bulk_is_confidential, CASE WHEN (ah.lease_customer_id IS NULL) THEN ((((COALESCE(ap.company_name, ''::character varying))::text || ' '::text) || (COALESCE(apl.location_name, ''::character varying))::text))::character varying ELSE func_format_refund_customer_names(ah.header_memo, false) END, CASE WHEN (max(ad.property_id) <> min(ad.property_id)) THEN 'Multiple'::text ELSE max((p.property_name)::text) END, sum(COALESCE(ad.pre_approval_amount, '0'::numeric)), sum(COALESCE(ad.transaction_amount, '0'::numeric)), sum(COALESCE(ad.transaction_amount_due, '0'::numeric)), ah.post_date, ah.due_date, ah.post_month, ah.header_number, ah.account_number, ah.header_memo, CASE WHEN (ah.header_memo IS NOT NULL) THEN func_format_refund_customer_names(ah.header_memo, false) ELSE NULL::character varying END, ah.is_temporary, (ah.is_posted)::integer, ah.ap_financial_status_type_id, ah.is_initial_import, ah.created_on, ap.ap_payee_status_type_id, apa.account_number, ad.ap_export_batch_id, CASE WHEN (fa.ap_header_id IS NOT NULL) THEN 1 ELSE 0 END, apl.vendor_code, ap.company_name, apl.location_name, fa.ap_header_id
  • Group Key: ah.id, ah.cid, ap.ap_payee_status_type_id, apa.account_number, ap.company_name, apl.vendor_code, apl.location_name, ad.ap_export_batch_id, fa.ap_header_id
  • Buffers: shared hit=358024 read=9380, local hit=3
2. 30.426 965.651 ↓ 11,274.0 11,274 1

Sort (cost=598.08..598.08 rows=1 width=355) (actual time=958.081..965.651 rows=11,274 loops=1)

  • Output: ah.id, ah.cid, ap.ap_payee_status_type_id, apa.account_number, ad.ap_export_batch_id, apl.vendor_code, ap.company_name, apl.location_name, fa.ap_header_id, ah.ap_payee_id, ah.ap_header_sub_type_id, ah.ap_payee_term_id, ah.lease_customer_id, ah.ap_payment_id, ah.po_ap_header_ids, ah.reversal_ap_header_id, ah.refund_ar_transaction_id, ah.transaction_datetime, ah.bulk_is_confidential, ah.header_memo, ad.property_id, p.property_name, ad.pre_approval_amount, ad.transaction_amount, ad.transaction_amount_due, ah.post_date, ah.due_date, ah.post_month, ah.header_number, ah.account_number, ah.is_temporary, ah.is_posted, ah.ap_financial_status_type_id, ah.is_initial_import, ah.created_on
  • Sort Key: ah.id DESC, ap.ap_payee_status_type_id, apa.account_number, ap.company_name, apl.vendor_code, apl.location_name, ad.ap_export_batch_id, fa.ap_header_id
  • Sort Method: quicksort Memory: 3827kB
  • Buffers: shared hit=358024 read=9380, local hit=3
3. 29.446 935.225 ↓ 11,274.0 11,274 1

Nested Loop Left Join (cost=10.74..598.07 rows=1 width=355) (actual time=1.032..935.225 rows=11,274 loops=1)

  • Output: ah.id, ah.cid, ap.ap_payee_status_type_id, apa.account_number, ad.ap_export_batch_id, apl.vendor_code, ap.company_name, apl.location_name, fa.ap_header_id, ah.ap_payee_id, ah.ap_header_sub_type_id, ah.ap_payee_term_id, ah.lease_customer_id, ah.ap_payment_id, ah.po_ap_header_ids, ah.reversal_ap_header_id, ah.refund_ar_transaction_id, ah.transaction_datetime, ah.bulk_is_confidential, ah.header_memo, ad.property_id, p.property_name, ad.pre_approval_amount, ad.transaction_amount, ad.transaction_amount_due, ah.post_date, ah.due_date, ah.post_month, ah.header_number, ah.account_number, ah.is_temporary, ah.is_posted, ah.ap_financial_status_type_id, ah.is_initial_import, ah.created_on
  • Buffers: shared hit=358024 read=9380, local hit=3
4. 28.594 747.943 ↓ 11,274.0 11,274 1

Nested Loop (cost=8.08..595.38 rows=1 width=351) (actual time=0.955..747.943 rows=11,274 loops=1)

  • Output: ah.id, ah.cid, ah.ap_payee_id, ah.ap_header_sub_type_id, ah.ap_payee_term_id, ah.lease_customer_id, ah.ap_payment_id, ah.po_ap_header_ids, ah.reversal_ap_header_id, ah.refund_ar_transaction_id, ah.transaction_datetime, ah.bulk_is_confidential, ah.header_memo, ah.post_date, ah.due_date, ah.post_month, ah.header_number, ah.account_number, ah.is_temporary, ah.is_posted, ah.ap_financial_status_type_id, ah.is_initial_import, ah.created_on, ap.company_name, ap.ap_payee_status_type_id, apl.location_name, apl.vendor_code, ad.property_id, ad.pre_approval_amount, ad.transaction_amount, ad.transaction_amount_due, ad.ap_export_batch_id, p.property_name, apa.account_number
  • Inner Unique: true
  • Buffers: shared hit=318667 read=7911, local hit=3
5. 22.950 674.253 ↓ 11,274.0 11,274 1

Nested Loop (cost=7.66..594.76 rows=1 width=345) (actual time=0.913..674.253 rows=11,274 loops=1)

  • Output: ah.id, ah.cid, ah.ap_payee_id, ah.ap_header_sub_type_id, ah.ap_payee_term_id, ah.lease_customer_id, ah.ap_payment_id, ah.po_ap_header_ids, ah.reversal_ap_header_id, ah.refund_ar_transaction_id, ah.transaction_datetime, ah.bulk_is_confidential, ah.header_memo, ah.post_date, ah.due_date, ah.post_month, ah.header_number, ah.account_number, ah.is_temporary, ah.is_posted, ah.ap_financial_status_type_id, ah.is_initial_import, ah.created_on, ah.ap_payee_account_id, ap.company_name, ap.ap_payee_status_type_id, apl.location_name, apl.vendor_code, ad.property_id, ad.pre_approval_amount, ad.transaction_amount, ad.transaction_amount_due, ad.ap_export_batch_id, p.property_name
  • Inner Unique: true
  • Buffers: shared hit=273646 read=7806, local hit=3
6. 23.997 594.933 ↓ 11,274.0 11,274 1

Nested Loop (cost=7.24..594.03 rows=1 width=330) (actual time=0.875..594.933 rows=11,274 loops=1)

  • Output: ah.id, ah.cid, ah.ap_payee_id, ah.ap_header_sub_type_id, ah.ap_payee_term_id, ah.lease_customer_id, ah.ap_payment_id, ah.po_ap_header_ids, ah.reversal_ap_header_id, ah.refund_ar_transaction_id, ah.transaction_datetime, ah.bulk_is_confidential, ah.header_memo, ah.post_date, ah.due_date, ah.post_month, ah.header_number, ah.account_number, ah.is_temporary, ah.is_posted, ah.ap_financial_status_type_id, ah.is_initial_import, ah.created_on, ah.ap_payee_location_id, ah.ap_payee_account_id, ap.company_name, ap.ap_payee_status_type_id, ad.property_id, ad.pre_approval_amount, ad.transaction_amount, ad.transaction_amount_due, ad.ap_export_batch_id, p.property_name
  • Inner Unique: true
  • Buffers: shared hit=228694 read=7646, local hit=3
7. 56.757 514.566 ↓ 11,274.0 11,274 1

Nested Loop (cost=6.82..593.30 rows=1 width=305) (actual time=0.820..514.566 rows=11,274 loops=1)

  • Output: ah.id, ah.cid, ah.ap_payee_id, ah.ap_header_sub_type_id, ah.ap_payee_term_id, ah.lease_customer_id, ah.ap_payment_id, ah.po_ap_header_ids, ah.reversal_ap_header_id, ah.refund_ar_transaction_id, ah.transaction_datetime, ah.bulk_is_confidential, ah.header_memo, ah.post_date, ah.due_date, ah.post_month, ah.header_number, ah.account_number, ah.is_temporary, ah.is_posted, ah.ap_financial_status_type_id, ah.is_initial_import, ah.created_on, ah.ap_payee_location_id, ah.ap_payee_account_id, ad.property_id, ad.pre_approval_amount, ad.transaction_amount, ad.transaction_amount_due, ad.ap_export_batch_id, p.property_name
  • Inner Unique: true
  • Buffers: shared hit=183748 read=7486, local hit=3
8. 35.031 161.646 ↓ 609.4 32,907 1

Nested Loop (cost=4.08..234.25 rows=54 width=50) (actual time=0.306..161.646 rows=32,907 loops=1)

  • Output: ad.property_id, ad.pre_approval_amount, ad.transaction_amount, ad.transaction_amount_due, ad.ap_export_batch_id, ad.cid, ad.ap_header_id, p.property_name
  • Buffers: shared hit=9851 read=4967, local hit=1
9. 0.314 0.720 ↓ 26.2 105 1

Hash Semi Join (cost=3.64..66.49 rows=4 width=33) (actual time=0.197..0.720 rows=105 loops=1)

  • Output: p.property_name, p.cid, p.id, load_properties_info.property_id
  • Hash Cond: (p.id = load_properties_info.property_id)
  • Buffers: shared hit=37 read=1, local hit=1
10. 0.255 0.255 ↑ 1.0 156 1

Index Scan using idx_properties_cid on public.properties p (cost=0.28..62.68 rows=156 width=29) (actual time=0.031..0.255 rows=156 loops=1)

  • Output: p.id, p.cid, p.property_id, p.property_type_id, p.company_region_id, p.time_zone_id, p.owner_id, p.account_id, p.occupancy_type_ids, p.remote_primary_key, p.property_name, p.lookup_code, p.country_code, p.vaultware_number, p.min_rent, p.max_rent, p.min_square_feet, p.max_square_feet, p.min_bedrooms, p.max_bedrooms, p.min_bathrooms, p.max_bathrooms, p.number_of_units, p.year_built, p.year_remodeled, p.short_description, p.full_description, p.driving_directions, p.termination_reason, p.termination_date, p.details, p.allows_cats, p.allows_dogs, p.has_availability, p.is_disabled, p.is_test, p.is_managerial, p.order_num, p.imported_on, p.disabled_on, p.updated_by, p.updated_on, p.created_by, p.created_on, p.locale_code
  • Index Cond: (p.cid = 15573)
  • Buffers: shared hit=37 read=1
11. 0.080 0.151 ↑ 1.0 105 1

Hash (cost=2.05..2.05 rows=105 width=4) (actual time=0.150..0.151 rows=105 loops=1)

  • Output: load_properties_info.property_id
  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
  • Buffers: local hit=1
12. 0.071 0.071 ↑ 1.0 105 1

Seq Scan on pg_temp_39.load_properties_info (cost=0.00..2.05 rows=105 width=4) (actual time=0.009..0.071 rows=105 loops=1)

  • Output: load_properties_info.property_id
  • Buffers: local hit=1
13. 125.895 125.895 ↓ 5.5 313 105

Index Scan using idx_ap_details_cid_property_id on public.ap_details ad (cost=0.43..41.37 rows=57 width=29) (actual time=0.021..1.199 rows=313 loops=105)

  • Output: ad.id, ad.cid, ad.ap_header_id, ad.order_detail_id, ad.ap_physical_status_type_id, ad.gl_transaction_type_id, ad.ap_transaction_type_id, ad.ap_post_type_id, ad.bank_account_id, ad.property_id, ad.inter_co_property_id, ad.property_unit_id, ad.ap_formula_id, ad.company_department_id, ad.gl_dimension_id, ad.job_phase_id, ad.ap_contract_id, ad.budget_ap_header_id, ad.ap_contract_ap_detail_id, ad.po_ap_detail_id, ad.reversal_ap_detail_id, ad.scheduled_ap_detail_id, ad.template_ap_detail_id, ad.reimbursement_ap_detail_id, ad.unit_of_measure_id, ad.ap_catalog_item_id, ad.ap_code_id, ad.ap_payee_sub_account_id, ad.job_ap_code_id, ad.gl_account_id, ad.ap_gl_account_id, ad.wip_gl_account_id, ad.purchases_clearing_gl_account_id, ad.pending_reimbursements_gl_account_id, ad.inter_co_ap_gl_account_id, ad.inter_co_bank_account_id, ad.bank_gl_account_id, ad.retention_payable_gl_account_id, ad.accrual_debit_gl_account_id, ad.accrual_credit_gl_account_id, ad.cash_debit_gl_account_id, ad.cash_credit_gl_account_id, ad.inter_co_ar_transaction_id, ad.refund_ar_transaction_id, ad.ap_export_batch_id, ad.fee_id, ad.period_id, ad.property_building_id, ad.unclaimed_ap_payment_id, ad.property_cam_pool_id, ad.post_month, ad.remote_primary_key, ad.transaction_datetime, ad.quantity_ordered, ad.quantity_received, ad.rate, ad.subtotal_amount, ad.tax_amount, ad.discount_amount, ad.shipping_amount, ad.pre_approval_amount, ad.transaction_amount, ad.transaction_amount_due, ad.initial_amount_due, ad.drawn_amount, ad.retention_amount, ad.description, ad.details, ad.is_reimbursement, ad.is_disbursement, ad.is_confidential, ad.is_1099, ad.is_approved_for_payment, ad.is_deleted, ad.is_reversed, ad.is_cross_allocation, ad.payment_approved_by, ad.payment_approved_on, ad.exported_by, ad.exported_on, ad.approved_by, ad.approved_on, ad.deleted_by, ad.deleted_on, ad.updated_by, ad.updated_on, ad.created_by, ad.created_on, ad.old_po_detail_id, ad.unit_type_id, ad.maintenance_location_id
  • Index Cond: ((ad.cid = 15573) AND (ad.property_id = p.id))
  • Filter: ((ad.deleted_by IS NULL) AND (ad.deleted_on IS NULL))
  • Rows Removed by Filter: 3
  • Buffers: shared hit=9814 read=4966
14. 206.864 296.163 ↓ 0.0 0 32,907

Index Scan using idx_ap_headers on public.ap_headers ah (cost=2.74..6.64 rows=1 width=266) (actual time=0.009..0.009 rows=0 loops=32,907)

  • Output: ah.id, ah.cid, ah.ap_header_type_id, ah.ap_header_sub_type_id, ah.ap_header_mode_id, ah.ap_physical_status_type_id, ah.ap_financial_status_type_id, ah.ap_payee_id, ah.order_header_id, ah.ap_payee_location_id, ah.ap_payee_account_id, ah.ap_remittance_id, ah.ap_payee_term_id, ah.inter_co_ap_payee_id, ah.inter_co_ap_payee_location_id, ah.inter_co_ap_payee_account_id, ah.inter_co_ap_remittance_id, ah.gl_transaction_type_id, ah.job_phase_id, ah.ap_contract_id, ah.bulk_job_phase_id, ah.bulk_ap_contract_id, ah.bulk_bank_account_id, ah.bulk_property_id, ah.bulk_ap_formula_id, ah.bulk_ap_code_id, ah.bulk_unit_number_id, ah.bulk_company_department_id, ah.bulk_gl_dimension_id, ah.bulk_property_building_id, ah.bulk_budget_ap_header_id, ah.ap_contract_ap_header_ids, ah.po_ap_header_ids, ah.reversal_ap_header_id, ah.payment_ap_header_id, ah.scheduled_ap_header_id, ah.template_ap_header_id, ah.reimbursement_ap_header_id, ah.frequency_id, ah.lease_customer_id, ah.refund_ar_transaction_id, ah.ap_batch_id, ah.ap_header_export_batch_id, ah.ap_payment_id, ah.compliance_job_id, ah.ap_routing_tag_id, ah.budget_change_order_id, ah.remote_primary_key, ah.template_name, ah.transaction_datetime, ah.post_date, ah.due_date, ah.post_month, ah.scheduled_payment_date, ah.start_date, ah.end_date, ah.frequency_interval, ah.day_of_week, ah.days_of_month, ah.number_of_occurrences, ah.last_posted_date, ah.next_post_date, ah.header_number, ah.external_url, ah.account_number, ah.header_memo, ah.control_total, ah.pre_approval_amount, ah.transaction_amount, ah.transaction_amount_due, ah.tax_amount, ah.discount_amount, ah.auto_create_po, ah.shipping_amount, ah.bulk_retention_percent, ah.bulk_is_confidential, ah.bulk_is_1099, ah.auto_approve_po, ah.auto_create_invoice, ah.auto_approve_invoice, ah.auto_post_invoice, ah.pay_with_single_check, ah.is_deleted, ah.is_reversed, ah.is_primary, ah.is_on_hold, ah.is_template, ah.is_disabled, ah.is_reimbursement, ah.is_batching, ah.is_temporary, ah.is_posted, ah.is_initial_import, ah.is_sync_to_va, ah.posted_on, ah.imported_on, ah.retention_released_by, ah.retention_released_on, ah.approved_by, ah.approved_on, ah.deleted_by, ah.deleted_on, ah.updated_by, ah.updated_on, ah.created_by, ah.created_on
  • Index Cond: (ah.id = ad.ap_header_id)
  • Filter: ((NOT ah.is_batching) AND (ah.ap_payment_id IS NULL) AND (ah.reversal_ap_header_id IS NULL) AND (ah.is_posted OR ((NOT ah.is_posted) AND ((ah.ap_financial_status_type_id IS NULL) OR (ah.ap_financial_status_type_id <> 6)))) AND (ah.cid = 15573) AND (ah.ap_header_type_id = 5) AND (ah.ap_header_sub_type_id = ANY ('{5,6,7,8,17,12}'::integer[])) AND CASE WHEN (ah.control_total = '0'::numeric) THEN CASE WHEN (ah.lease_customer_id IS NOT NULL) THEN (hashed SubPlan 1) ELSE (SubPlan 3) END ELSE ((ah.id = ah.id) AND (ah.cid = ah.cid)) END)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=173897 read=2519, local hit=2
15.          

SubPlan (forIndex Scan)

16. 0.051 0.051 ↑ 1.0 105 1

Seq Scan on pg_temp_39.load_properties_info load_properties_info_1 (cost=0.00..2.05 rows=105 width=4) (actual time=0.008..0.051 rows=105 loops=1)

  • Output: load_properties_info_1.property_id
  • Buffers: local hit=1
17. 22.247 89.248 ↑ 1.0 1 11,156

Result (cost=0.43..2.65 rows=1 width=0) (actual time=0.008..0.008 rows=1 loops=11,156)

  • One-Time Filter: (hashed SubPlan 2)
  • Buffers: shared hit=44560 read=108, local hit=1
18. 66.936 66.936 ↑ 1.0 1 11,156

Index Scan using idx_ap_details_cid_apheaderid on public.ap_details (cost=0.43..2.65 rows=1 width=0) (actual time=0.006..0.006 rows=1 loops=11,156)

  • Output: ap_details.id, ap_details.cid, ap_details.ap_header_id, ap_details.order_detail_id, ap_details.ap_physical_status_type_id, ap_details.gl_transaction_type_id, ap_details.ap_transaction_type_id, ap_details.ap_post_type_id, ap_details.bank_account_id, ap_details.property_id, ap_details.inter_co_property_id, ap_details.property_unit_id, ap_details.ap_formula_id, ap_details.company_department_id, ap_details.gl_dimension_id, ap_details.job_phase_id, ap_details.ap_contract_id, ap_details.budget_ap_header_id, ap_details.ap_contract_ap_detail_id, ap_details.po_ap_detail_id, ap_details.reversal_ap_detail_id, ap_details.scheduled_ap_detail_id, ap_details.template_ap_detail_id, ap_details.reimbursement_ap_detail_id, ap_details.unit_of_measure_id, ap_details.ap_catalog_item_id, ap_details.ap_code_id, ap_details.ap_payee_sub_account_id, ap_details.job_ap_code_id, ap_details.gl_account_id, ap_details.ap_gl_account_id, ap_details.wip_gl_account_id, ap_details.purchases_clearing_gl_account_id, ap_details.pending_reimbursements_gl_account_id, ap_details.inter_co_ap_gl_account_id, ap_details.inter_co_bank_account_id, ap_details.bank_gl_account_id, ap_details.retention_payable_gl_account_id, ap_details.accrual_debit_gl_account_id, ap_details.accrual_credit_gl_account_id, ap_details.cash_debit_gl_account_id, ap_details.cash_credit_gl_account_id, ap_details.inter_co_ar_transaction_id, ap_details.refund_ar_transaction_id, ap_details.ap_export_batch_id, ap_details.fee_id, ap_details.period_id, ap_details.property_building_id, ap_details.unclaimed_ap_payment_id, ap_details.property_cam_pool_id, ap_details.post_month, ap_details.remote_primary_key, ap_details.transaction_datetime, ap_details.quantity_ordered, ap_details.quantity_received, ap_details.rate, ap_details.subtotal_amount, ap_details.tax_amount, ap_details.discount_amount, ap_details.shipping_amount, ap_details.pre_approval_amount, ap_details.transaction_amount, ap_details.transaction_amount_due, ap_details.initial_amount_due, ap_details.drawn_amount, ap_details.retention_amount, ap_details.description, ap_details.details, ap_details.is_reimbursement, ap_details.is_disbursement, ap_details.is_confidential, ap_details.is_1099, ap_details.is_approved_for_payment, ap_details.is_deleted, ap_details.is_reversed, ap_details.is_cross_allocation, ap_details.payment_approved_by, ap_details.payment_approved_on, ap_details.exported_by, ap_details.exported_on, ap_details.approved_by, ap_details.approved_on, ap_details.deleted_by, ap_details.deleted_on, ap_details.updated_by, ap_details.updated_on, ap_details.created_by, ap_details.created_on, ap_details.old_po_detail_id, ap_details.unit_type_id, ap_details.maintenance_location_id
  • Index Cond: ((ap_details.cid = 15573) AND (ah.id = ap_details.ap_header_id))
  • Filter: ((ap_details.deleted_by IS NULL) AND (ap_details.deleted_on IS NULL))
  • Rows Removed by Filter: 0
  • Buffers: shared hit=44560 read=108
19.          

SubPlan (forResult)

20. 0.065 0.065 ↑ 1.0 105 1

Seq Scan on pg_temp_39.load_properties_info load_properties_info_2 (cost=0.00..2.05 rows=105 width=4) (actual time=0.007..0.065 rows=105 loops=1)

  • Output: load_properties_info_2.property_id
  • Buffers: local hit=1
21. 56.370 56.370 ↑ 1.0 1 11,274

Index Scan using pk_ap_payees on public.ap_payees ap (cost=0.42..0.73 rows=1 width=33) (actual time=0.005..0.005 rows=1 loops=11,274)

  • Output: ap.id, ap.cid, ap.integration_database_id, ap.ap_payee_term_id, ap.default_ap_remittance_id, ap.gl_account_id, ap.vendor_id, ap.ap_payee_type_id, ap.ap_payee_status_type_id, ap.categorization_type_id, ap.confidentiality_allowance_type_id, ap.cam_allowance_type_id, ap.vendor_category_type_id, ap.compliance_rulset_id, ap.reference_id, ap.customer_id, ap.secondary_number, ap.remote_primary_key, ap.system_code, ap.company_name, ap.username, ap.website_url, ap.notes, ap.sales_tax_description, ap.shipping_description, ap.discount_description, ap.require_po_for_invoice, ap.is_categorization_queued, ap.is_consolidated, ap.is_system, ap.is_on_site, ap.is_utilities, ap.is_capture_invoice_total_only, ap.updated_by, ap.updated_on, ap.created_by, ap.created_on
  • Index Cond: ((ap.cid = 15573) AND (ap.id = ah.ap_payee_id))
  • Buffers: shared hit=44946 read=160
22. 56.370 56.370 ↑ 1.0 1 11,274

Index Scan using idx_ap_payee_locations_id on public.ap_payee_locations apl (cost=0.42..0.73 rows=1 width=27) (actual time=0.005..0.005 rows=1 loops=11,274)

  • Output: apl.id, apl.cid, apl.ap_payee_id, apl.default_ap_routing_tag_id, apl.ap_legal_entity_id, apl.store_id, apl.payee_name, apl.vendor_code, apl.location_name, apl.location_datetime, apl.phone_number, apl.street_line1, apl.street_line2, apl.street_line3, apl.city, apl.state_code, apl.fax_number, apl.mobile_number, apl.email_address, apl.province, apl.postal_code, apl.country_code, apl.notes, apl.duns_number, apl.is_primary, apl.disabled_by, apl.disabled_on, apl.deleted_by, apl.deleted_on, apl.updated_by, apl.updated_on, apl.created_by, apl.created_on
  • Index Cond: (apl.id = ah.ap_payee_location_id)
  • Filter: (apl.cid = 15573)
  • Buffers: shared hit=44952 read=160
23. 45.096 45.096 ↑ 1.0 1 11,274

Index Scan using idx_ap_payee_accounts_id on public.ap_payee_accounts apa (cost=0.42..0.62 rows=1 width=18) (actual time=0.004..0.004 rows=1 loops=11,274)

  • Output: apa.id, apa.cid, apa.ap_payee_id, apa.ap_payee_location_id, apa.ap_remittance_id, apa.default_gl_account_id, apa.default_property_id, apa.utility_bill_account_id, apa.replacement_ap_payee_account_id, apa.audit_frequency_id, apa.buyer_account_id, apa.utility_bill_receipt_type_id, apa.account_number, apa.account_description, apa.audit_day, apa.last_invoice_date, apa.audit_start_date, apa.audit_invoice, apa.audit_invoice_count, apa.is_disabled, apa.entrata_address_on, apa.is_capture_invoice_total_only, apa.updated_by, apa.updated_on, apa.created_by, apa.created_on
  • Index Cond: (apa.id = ah.ap_payee_account_id)
  • Filter: (apa.cid = 15573)
  • Buffers: shared hit=45021 read=105
24. 33.822 157.836 ↑ 1.0 1 11,274

Limit (cost=2.66..2.67 rows=1 width=8) (actual time=0.013..0.014 rows=1 loops=11,274)

  • Output: fa.id, fa.ap_header_id
  • Buffers: shared hit=39357 read=1469
25. 45.096 124.014 ↑ 1.0 1 11,274

Sort (cost=2.66..2.67 rows=1 width=8) (actual time=0.011..0.011 rows=1 loops=11,274)

  • Output: fa.id, fa.ap_header_id
  • Sort Key: fa.id DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=39357 read=1469
26. 78.918 78.918 ↑ 1.0 1 11,274

Index Scan using idx_file_associations_cid_ap_header_id on public.file_associations fa (cost=0.43..2.65 rows=1 width=8) (actual time=0.007..0.007 rows=1 loops=11,274)

  • Output: fa.id, fa.ap_header_id
  • Index Cond: ((ah.cid = fa.cid) AND (ah.id = fa.ap_header_id))
  • Filter: (fa.deleted_by IS NULL)
  • Buffers: shared hit=39357 read=1469