explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aedI

Settings
# exclusive inclusive rows x rows loops node
1. 0.622 0.657 ↓ 0.0 0 1

Delete on contacts (cost=0.44..2.75 rows=1 width=6) (actual time=0.657..0.657 rows=0 loops=1)

2. 0.035 0.035 ↑ 1.0 1 1

Index Scan using contacts_pkey on contacts (cost=0.44..2.75 rows=1 width=6) (actual time=0.033..0.035 rows=1 loops=1)

  • Index Cond: ((company_id = (current_setting('nimble.company_id'::text))::bytea) AND (id = '\x56b1303eb2a6bd497256f7f2'::bytea))
  • Filter: ((((owner_id IS NOT NULL) AND (owner_id = (current_setting('nimble.user_id'::text))::bytea)) OR (edit_for_users && '{""\\x00""}'::bytea[]) OR (edit_for_users && ARRAY[(current_setting('nimble.user_id'::text))::bytea]) OR (edit_for_groups && (string_to_array(current_setting('nimble.group_ids'::text), ','::text))::bytea[])) AND (((owner_id IS NOT NULL) AND (owner_id = (current_setting('nimble.user_id'::text))::bytea)) OR (read_for_users && '{""\\x00""}'::bytea[]) OR (read_for_users && ARRAY[(current_setting('nimble.user_id'::text))::bytea]) OR (read_for_groups && (string_to_array(current_setting('nimble.group_ids'::text), ','::text))::bytea[]) OR (edit_for_users && ARRAY[(current_setting('nimble.user_id'::text))::bytea]) OR (edit_for_groups && (string_to_array(current_setting('nimble.group_ids'::text), ','::text))::bytea[])))
Planning time : 0.658 ms
Execution time : 195.485 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
for constraint contacts_last_contacted_contacts_company_id_id_fk on contacts 1.596 ms 1 1.596 ms
for constraint contacts_avatars_company_id_contact_id_fkey on contacts 11.809 ms 1 11.809 ms
for constraint contacts_tags_associations_company_id_contact_id_fkey on contacts 4.481 ms 1 4.481 ms
for constraint contacts_values_company_id_id_fkey on contacts 25.692 ms 1 25.692 ms
for constraint contacts_importance_company_id_contact_id_fkey on contacts 2.677 ms 1 2.677 ms
for constraint contacts__aggregated_company_id_contact_id_fk on contacts 27.196 ms 1 27.196 ms
for constraint contacts__aggregated_only_ft_company_id_contact_id_fk on contacts 27.350 ms 1 27.350 ms
for constraint contacts__suggestions_contacts_company_id_id_fkey on contacts 25.384 ms 1 25.384 ms
for constraint contacts__addresses_company_id_fkey on contacts 7.589 ms 1 7.589 ms
for constraint contacts_links_company_id_from_contact_fkey on contacts 36.860 ms 1 36.860 ms
for constraint contacts_links_company_id_to_contact_fkey on contacts 0.794 ms 1 0.794 ms
for constraint contacts__timestamps_company_id_fkey on contacts 2.020 ms 1 2.020 ms
for constraint contact_reminders_company_id_contact_id_fkey on contacts 1.172 ms 1 1.172 ms
update_contacts__any_on_delete on contacts_values 11.897 ms 1 11.897 ms
update_contacts__suggestions_on_delete on contacts_values 1.838 ms 1 1.838 ms
update_contacts_aggregated_names_delete on contacts_values 4.139 ms 1 4.139 ms
update_contacts__any_on_delete_address on contacts__addresses 2.253 ms 1 2.253 ms