explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OKdA

Settings
# exclusive inclusive rows x rows loops node
1. 0.022 0.475 ↓ 19.0 19 1

Sort (cost=175.67..175.67 rows=1 width=59) (actual time=0.473..0.475 rows=19 loops=1)

  • Output: policyenti0_.policy_number, policyenti0_.policy_year, productent1_.name, policyenti0_.creation_date, policyenti0_.protection_start_date, policyenti0_.protection_end_date
  • Sort Key: policyenti0_.creation_date DESC
  • Sort Method: quicksort Memory: 27kB
  • Buffers: shared hit=430
2. 0.018 0.453 ↓ 19.0 19 1

Nested Loop (cost=2.02..175.66 rows=1 width=59) (actual time=0.110..0.453 rows=19 loops=1)

  • Output: policyenti0_.policy_number, policyenti0_.policy_year, productent1_.name, policyenti0_.creation_date, policyenti0_.protection_start_date, policyenti0_.protection_end_date
  • Buffers: shared hit=430
3. 0.016 0.416 ↓ 19.0 19 1

Nested Loop (cost=1.73..175.35 rows=1 width=75) (actual time=0.103..0.416 rows=19 loops=1)

  • Output: policyenti0_.policy_number, policyenti0_.policy_year, policyenti0_.creation_date, policyenti0_.protection_start_date, policyenti0_.protection_end_date, productent1_.name, personvalu2_.group_id, productgro3_1_.id
  • Buffers: shared hit=373
4. 0.028 0.375 ↓ 25.0 25 1

Nested Loop (cost=1.58..175.16 rows=1 width=67) (actual time=0.099..0.375 rows=25 loops=1)

  • Output: policyenti0_.policy_number, policyenti0_.policy_year, policyenti0_.creation_date, policyenti0_.protection_start_date, policyenti0_.protection_end_date, policyenti0_.product_id, personvalu2_.group_id, productgro3_1_.id
  • Buffers: shared hit=323
5. 0.014 0.212 ↓ 27.0 27 1

Nested Loop (cost=1.16..174.64 rows=1 width=24) (actual time=0.035..0.212 rows=27 loops=1)

  • Output: personvalu2_.policy_id, personvalu2_.group_id, productgro3_1_.id
  • Buffers: shared hit=215
6. 0.013 0.088 ↓ 3.7 55 1

Nested Loop (cost=0.86..169.78 rows=15 width=16) (actual time=0.024..0.088 rows=55 loops=1)

  • Output: personvalu2_.policy_id, personvalu2_.group_id
  • Buffers: shared hit=50
7. 0.021 0.021 ↑ 1.0 3 1

Index Scan using idx_company_no on frontend.prs_person personenti4_ (cost=0.43..12.50 rows=3 width=8) (actual time=0.015..0.021 rows=3 loops=1)

  • Output: personenti4_.id, personenti4_.bid, personenti4_.id_subrea, personenti4_.name, personenti4_.surname, personenti4_.gender, personenti4_.nationality, personenti4_.company_name, personenti4_.company_no, personenti4_.nip, personenti4_.pid_number, personenti4_.pid_type, personenti4_.birth_date, personenti4_.taxpayer_number, personenti4_.phone, personenti4_.phone2, personenti4_.fax, personenti4_.email, personenti4_.person_type, personenti4_.approval_truestatement, personenti4_.approval_sharingdata, personenti4_.address_perm, personenti4_.address_corr, personenti4_.address_addt, personenti4_.date_from, personenti4_.date_to, personenti4_.version, personenti4_.pesel, personenti4_.person_source, personenti4_.middle_name, personenti4_.valid_pesel, personenti4_.processing_restricted, personenti4_.processing_restricted_from, personenti4_.processing_restricted_to, personenti4_.processing_restricted_login
  • Index Cond: ((personenti4_.company_no)::text = '611392932'::text)
  • Buffers: shared hit=9
8. 0.054 0.054 ↓ 1.2 18 3

Index Scan using idx_person_id on frontend.pcy_person_value personvalu2_ (cost=0.43..52.28 rows=15 width=24) (actual time=0.006..0.018 rows=18 loops=3)

  • Output: personvalu2_.id, personvalu2_.bid, personvalu2_.policy_id, personvalu2_.group_id, personvalu2_.person_id, personvalu2_.date_from, personvalu2_.date_to, personvalu2_.version, personvalu2_.correlation_id, personvalu2_.row_number, personvalu2_.person_autosave_id
  • Index Cond: (personvalu2_.person_id = personenti4_.id)
  • Buffers: shared hit=41
9. 0.110 0.110 ↓ 0.0 0 55

Index Scan using pk_prd_item on frontend.prd_item productgro3_1_ (cost=0.29..0.31 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=55)

  • Output: productgro3_1_.id, productgro3_1_.bid, productgro3_1_.parent_item_id, productgro3_1_.type, productgro3_1_.code, productgro3_1_.name, productgro3_1_.label, productgro3_1_.alias, productgro3_1_.description, productgro3_1_.ordinal_number, productgro3_1_.date_from, productgro3_1_.date_to, productgro3_1_.version, productgro3_1_.visible, productgro3_1_.editable, productgro3_1_.required, productgro3_1_.path, productgro3_1_.product_id, productgro3_1_.renderable
  • Index Cond: (productgro3_1_.id = personvalu2_.group_id)
  • Filter: ((productgro3_1_.alias)::text = 'UBEZPIECZAJACY'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=165
10. 0.135 0.135 ↑ 1.0 1 27

Index Scan using pk_pcy_policy on frontend.pcy_policy policyenti0_ (cost=0.43..0.52 rows=1 width=59) (actual time=0.005..0.005 rows=1 loops=27)

  • Output: policyenti0_.id, policyenti0_.bid, policyenti0_.id_subrea, policyenti0_.type, policyenti0_.policy_number, policyenti0_.policy_year, policyenti0_.barcode, policyenti0_.parent_policy_id, policyenti0_.product_id, policyenti0_.creation_date, policyenti0_.modification_date, policyenti0_.expiry_date, policyenti0_.status, policyenti0_.date_from, policyenti0_.date_to, policyenti0_.version, policyenti0_.unit, policyenti0_.user_code, policyenti0_.user_login, policyenti0_.user_representative, policyenti0_.user_category, policyenti0_.modified, policyenti0_.export_id, policyenti0_.last_updated_by_user, policyenti0_.subtype, policyenti0_.cause, policyenti0_.general_policy_id, policyenti0_.protection_start_date, policyenti0_.protection_end_date, policyenti0_.policy_premium, policyenti0_.policy_payment, policyenti0_.edit_operation, policyenti0_.policy_paid, policyenti0_.actual, policyenti0_.status_change_date, policyenti0_.calculation_date, policyenti0_.edited_policy_id, policyenti0_.has_annex, policyenti0_.loss_ratio, policyenti0_.prediction_calculated, policyenti0_.dpo_oc, policyenti0_.dko_oc, policyenti0_.mandatory_policy, policyenti0_.policy_paid_on_time, policyenti0_.date_of_agreement_conclusion, policyenti0_.automatic_renewal_policy, policyenti0_.termination_policy, policyenti0_.transfer_of_ownership, policyenti0_.doc_receipt_date, policyenti0_.verification_date, policyenti0_.flow, policyenti0_.issue_date, policyenti0_.doc_receipt_state, policyenti0_.statement_verified, policyenti0_.owner_unit, policyenti0_.owner_user_login, policyenti0_.owner_user_code, policyenti0_.owner_user_representative, policyenti0_.created_from_category, policyenti0_.automatically_renewed, policyenti0_.acceptance_date
  • Index Cond: (policyenti0_.id = personvalu2_.policy_id)
  • Filter: (((policyenti0_.status)::text <> ALL ('{CANCELED,CANCELED_BY_HQ}'::text[])) AND ((policyenti0_.type)::text = 'POLICY'::text))
  • Rows Removed by Filter: 0
  • Buffers: shared hit=108
11. 0.025 0.025 ↑ 1.0 1 25

Index Scan using pk_prd_product on frontend.prd_product productent1_ (cost=0.14..0.17 rows=1 width=24) (actual time=0.001..0.001 rows=1 loops=25)

  • Output: productent1_.id, productent1_.bid, productent1_.root_item_id, productent1_.name, productent1_.code, productent1_.label, productent1_.description, productent1_.date_from, productent1_.date_to, productent1_.version, productent1_.product_class, productent1_.flow_code, productent1_.version_number, productent1_.group_product, productent1_.longterm, productent1_.days_to_offer_expiry, productent1_.days_to_policy_renewal, productent1_.office, productent1_.annex_perspective, productent1_.xls_import, productent1_.calculation_view, productent1_.product_categories, productent1_.ws_export
  • Index Cond: (productent1_.id = policyenti0_.product_id)
  • Filter: ((productent1_.code)::text = ANY ('{UZ15,UZ16,rubiAgroEkspert,rubiSprzetRolniczy,Agro_GM14,AgroAgro,CBIZwierzeta,ConcordiaKonie}'::text[]))
  • Rows Removed by Filter: 0
  • Buffers: shared hit=50
12. 0.019 0.019 ↑ 1.0 1 19

Index Only Scan using pk_prd_group on frontend.prd_group productgro3_ (cost=0.29..0.30 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=19)

  • Output: productgro3_.id
  • Index Cond: (productgro3_.id = personvalu2_.group_id)
  • Heap Fetches: 19
  • Buffers: shared hit=57
Planning time : 5.801 ms
Execution time : 0.639 ms