explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MOFU

Settings
# exclusive inclusive rows x rows loops node
1. 18.781 173,024.459 ↑ 5.4 3,118 1

Unique (cost=89,261,928.11..89,267,399.98 rows=16,708 width=3,005) (actual time=173,005.262..173,024.459 rows=3,118 loops=1)

2. 210.840 173,005.678 ↑ 2.8 5,888 1

Sort (cost=89,261,928.11..89,261,969.88 rows=16,708 width=3,005) (actual time=173,005.260..173,005.678 rows=5,888 loops=1)

  • Sort Key: contractors.id, contractors.contact_id, contractors.acnt_nmbr, contractors.acnt_type, contractors.acnt_stat, contractors.date_start, contractors.date_exp, contractors.insurance_type1, contractors.insurance_name1, contractors.insurance_policy_num1, contractors.insurance_exp_date1, contractors.insurance_type2, contractors.insurance_name2, contractors.insurance_policy_num2, contractors.insurance_exp_date2, contractors.note, contractors.active, contractors."timestamp", contractors.cust_type, contractors.insurance_exempt2, contractors.insurance_exempt1, contractors.contractor_types, contractors.category, contractors.last_renewal_date, contractors.insurance_agent1, contractors.insurance_phone1, contractors.state_license_nmbr, contractors.state_license_exp_date, contractors.user_fld1, contractors.user_fld2, contractors.user_fld3, contractors.license_no, contractors.case_nmbr, contractors.issued_date, contractors.e_notification, contractors.expiration_date, contractors.original_id, contractors.processed_by, contractors.issued_by, contractors.is_closed, contractors.renewof_id, contractors.date_closed, contractors.last_case_update, contractors.last_status_update, contractors.web_nmbr, contractors.web_approved_date, contractors.web_approved_by, contractors.public_pass, contractors.classification, ((SubPlan 1)), ((SubPlan 2)), (CASE WHEN ((SubPlan 3) > 0) THEN 'CHILD'::text ELSE 'PARENT'::text END), (((COALESCE((('[#'::text || NULLIF((contractors.license_no)::text, ''::text)) || '] '::text), '[No License #] '::text) || btrim((_contacts.existing_contact)::text)) || COALESCE((' - '::text || NULLIF(btrim(address.number_street_unit_addr3_city_state_zip), ''::text)), ''::text))), (COALESCE((count(CASE WHEN (((uploaded_documents.image)::text <> 'yes'::text) OR (uploaded_documents.image IS NULL)) THEN uploaded_documents.id ELSE NULL::bigint END)), '0'::bigint)), (COALESCE((count(CASE WHEN ((uploaded_documents.image)::text = 'yes'::text) THEN uploaded_documents.id ELSE NULL::bigint END)), '0'::bigint)), (COALESCE((count(emails.eid)), '0'::bigint)), (COALESCE((count(fee_charges.id)), '0'::bigint)), (COALESCE((sum(fee_charges_1.amount)), 0.00)), (COALESCE((COALESCE((sum((p.amount * (p.sign_value)::numeric))), 0.00)), 0.00)), (COALESCE((COALESCE(((sum(fee_charges_1.amount)) - COALESCE((sum((p.amount * (p.sign_value)::numeric))), 0.00)), 0.00)), 0.00)), vw_actions.rhs_activities_count, (count(fees.fid)), (CASE WHEN (sum((payments.amount * (payments.sign_value)::numeric)) IS NULL) THEN 0.00 ELSE sum((payments.amount * (payments.sign_value)::numeric)) END), (CASE WHEN (sum(fees_1.amnt) IS NULL) THEN 0.00 ELSE sum(fees_1.amnt) END), (sum(fees_2.amnt)), (sum(fees_3.amnt)), (sum(fees_4.amnt)), ((SubPlan 4)), ((SubPlan 5)), ((count(*))::text), (concat_pipe_agg(gc_content.rhs_contacts_content)), ((SubPlan 6)), ((SubPlan 7)), ((SubPlan 8)), ((SubPlan 9)), ((SubPlan 10)), ((SubPlan 11)), ((SubPlan 12)), ((SubPlan 13)), ((SubPlan 14)), ((SubPlan 15)), ((SubPlan 16)), ((SubPlan 17)), ((SubPlan 18)), ((SubPlan 19)), ((SubPlan 20)), ((SubPlan 21)), ((SubPlan 22)), ((SubPlan 23)), ((SubPlan 24)), ((SubPlan 25)), ((SubPlan 26)), ((SubPlan 27)), ((SubPlan 28)), ((SubPlan 29)), ((SubPlan 30)), ((SubPlan 31)), ((SubPlan 32)), ((SubPlan 33)), ((SubPlan 34)), ((SubPlan 35)), ((SubPlan 36)), ((SubPlan 37)), ((SubPlan 38)), ((COALESCE((('[#'::text || NULLIF((contractors.case_nmbr)::text, ''::text)) || '] '::text), '[No Case Number] '::text) || COALESCE(NULLIF(((CASE WHEN (((sts.historical_taxid)::text <> ''::text) AND (sts.historical_taxid IS NOT NULL)) THEN (CASE WHEN (CASE WHEN (CASE WHEN ((sts.historical_address)::text IS NULL) THEN '('::text ELSE (((sts.historical_address)::text || ' '::text) || '('::text) END IS NULL) THEN (sts.historical_taxid)::text WHEN ((sts.historical_taxid)::text IS NULL) THEN CASE WHEN ((sts.historical_address)::text IS NULL) THEN '('::text ELSE (((sts.historical_address)::text || ' '::text) || '('::text) END ELSE ((CASE WHEN ((sts.historical_address)::text IS NULL) THEN '('::text ELSE (((sts.historical_address)::text || ' '::text) || '('::text) END || ' '::text) || (sts.historical_taxid)::text) END IS NULL) THEN ')'::text ELSE ((CASE WHEN (CASE WHEN ((sts.historical_address)::text IS NULL) THEN '('::text ELSE (((sts.historical_address)::text || ' '::text) || '('::text) END IS NULL) THEN (sts.historical_taxid)::text WHEN ((sts.historical_taxid)::text IS NULL) THEN CASE WHEN ((sts.historical_address)::text IS NULL) THEN '('::text ELSE (((sts.historical_address)::text || ' '::text) || '('::text) END ELSE ((CASE WHEN ((sts.historical_address)::text IS NULL) THEN '('::text ELSE (((sts.historical_address)::text || ' '::text) || '('::text) END || ' '::text) || (sts.historical_taxid)::text) END || ' '::text) || ')'::text) END)::character varying ELSE sts.historical_address END))::text, ''::text), 'No Address'::text))), (((COALESCE((('[#'::text || NULLIF((contractors.case_nmbr)::text, ''::text)) || '] '::text), '[No Case Number] '::text) || COALESCE((('[#'::text || NULLIF((contractors.license_no)::text, ''::text)) || '] '::text), '[No Cert Number] '::text)) || COALESCE(NULLIF(((CASE WHEN (((sts.historical_taxid)::text <> ''::text) AND (sts.historical_taxid IS NOT NULL)) THEN (CASE WHEN (CASE WHEN (CASE WHEN ((sts.historical_address)::text IS NULL) THEN '('::text ELSE (((sts.historical_address)::text || ' '::text) || '('::text) END IS NULL) THEN (sts.historical_taxid)::text WHEN ((sts.historical_taxid)::text IS NULL) THEN CASE WHEN ((sts.historical_address)::text IS NULL) THEN '('::text ELSE (((sts.historical_address)::text || ' '::text) || '('::text) END ELSE ((CASE WHEN ((sts.historical_address)::text IS NULL) THEN '('::text ELSE (((sts.historical_address)::text || ' '::text) || '('::text) END || ' '::text) || (sts.historical_taxid)::text) END IS NULL) THEN ')'::text ELSE ((CASE WHEN (CASE WHEN ((sts.historical_address)::text IS NULL) THEN '('::text ELSE (((sts.historical_address)::text || ' '::text) || '('::text) END IS NULL) THEN (sts.historical_taxid)::text WHEN ((sts.historical_taxid)::text IS NULL) THEN CASE WHEN ((sts.historical_address)::text IS NULL) THEN '('::text ELSE (((sts.historical_address)::text || ' '::text) || '('::text) END ELSE ((CASE WHEN ((sts.historical_address)::text IS NULL) THEN '('::text ELSE (((sts.historical_address)::text || ' '::text) || '('::text) END || ' '::text) || (sts.historical_taxid)::text) END || ' '::text) || ')'::text) END)::character varying ELSE sts.historical_address END))::text, ''::text), 'No Address'::text))), (concat_agg((proj.name)::text)), (concat_pipe_agg((subcases.name)::text)), (CASE WHEN (contractors.insurance_exp_date1 > contractors.insurance_exp_date2) THEN contractors.insurance_exp_date1 WHEN (contractors.insurance_exp_date2 > contractors.insurance_exp_date1) THEN contractors.insurance_exp_date2 ELSE contractors.insurance_exp_date1 END), (CASE WHEN (contractors.original_id > 0) THEN 'Renewal'::text ELSE 'New'::text END), ((SubPlan 39)), ((SubPlan 40)), ((SubPlan 41)), (concat_agg((case_tags.tag)::text)), ((SubPlan 42)), ((SubPlan 43)), ((SubPlan 44)), (tab_id('cache.dg_contractors_all'::character varying, 'category'::character varying, contractors.category)), (((max((CASE WHEN ((additional_info.name)::text = 'additional_contact'::text) THEN additional_info.info ELSE NULL::character varying END)::text)))::character varying), (((max((CASE WHEN ((additional_info.name)::text = 'additional_contact2'::text) THEN additional_info.info ELSE NULL::character varying END)::text)))::character varying), (((max((CASE WHEN ((additional_info.name)::text = 'additional_phone_number'::text) THEN additional_info.info ELSE NULL::character varying END)::text)))::character varying), (((max((CASE WHEN ((additional_info.name)::text = 'monetary_limit'::text) THEN additional_info.info ELSE NULL::character varying END)::text)))::character varying), (((max((CASE WHEN ((additional_info.name)::text = 'data_in_st_text'::text) THEN additional_info.info ELSE NULL::character varying END)::text)))::character varying), (((max((CASE WHEN ((additional_info.name)::text = 'shelby_county_business_license_no'::text) THEN additional_info.info ELSE NULL::character varying END)::text)))::character varying), (((max((CASE WHEN ((additional_info.name)::text = 'bartlett_business_license_no'::text) THEN additional_info.info ELSE NULL::character varying END)::text)))::character varying), (((max((CASE WHEN ((additional_info.name)::text = 'bartlett_business_license_expiration'::text) THEN additional_info.info ELSE NULL::character varying END)::text)))::character varying), (((max((CASE WHEN ((additional_info.name)::text = 'bond_number'::text) THEN additional_info.info ELSE NULL::character varying END)::text)))::character varying), (((max((CASE WHEN ((additional_info.name)::text = 'business_account'::text) THEN additional_info.info ELSE NULL::character varying END)::text)))::character varying), (((max((CASE WHEN ((additional_info.name)::text = 'legacy_contractor_type'::text) THEN additional_info.info ELSE NULL::character varying END)::text)))::character varying), (((max((CASE WHEN ((additional_info.name)::text = 'foreman'::text) THEN additional_info.info ELSE NULL::character varying END)::text)))::character varying)
  • Sort Method: quicksort Memory: 6554kB
3. 1,331.235 172,794.838 ↑ 2.8 5,888 1

Nested Loop Left Join (cost=123,084.14..89,260,756.19 rows=16,708 width=3,005) (actual time=493.085..172,794.838 rows=5,888 loops=1)

4. 26.974 582.067 ↑ 2.8 5,888 1

Merge Right Join (cost=123,083.72..128,527.90 rows=16,708 width=972) (actual time=461.612..582.067 rows=5,888 loops=1)

  • Merge Cond: (groups_contacts.section_id = contractors.id)
5. 4.425 22.185 ↑ 1.0 5,888 1

Merge Append (cost=0.42..476.80 rows=5,977 width=4) (actual time=0.050..22.185 rows=5,888 loops=1)

  • Sort Key: groups_contacts.section_id
6. 0.025 0.025 ↓ 0.0 0 1

Index Only Scan using groups_contacts_idx1 on groups_contacts (cost=0.12..8.14 rows=1 width=4) (actual time=0.025..0.025 rows=0 loops=1)

  • Index Cond: (section = 'license'::text)
  • Heap Fetches: 0
7. 17.735 17.735 ↑ 1.0 5,888 1

Index Scan using idx_groups_contacts__license_section_id on groups_contacts__license (cost=0.28..423.82 rows=5,976 width=4) (actual time=0.024..17.735 rows=5,888 loops=1)

  • Filter: ((section)::text = 'license'::text)
8. 11.214 532.908 ↑ 1.5 5,888 1

Materialize (cost=123,083.30..127,807.32 rows=8,716 width=972) (actual time=461.558..532.908 rows=5,888 loops=1)

9. 12.291 521.694 ↑ 2.8 3,118 1

Nested Loop Left Join (cost=123,083.30..127,785.53 rows=8,716 width=972) (actual time=461.550..521.694 rows=3,118 loops=1)

10. 4.166 481.341 ↑ 2.8 3,118 1

Merge Left Join (cost=123,082.88..123,195.28 rows=8,716 width=939) (actual time=461.530..481.341 rows=3,118 loops=1)

  • Merge Cond: (contractors.id = case_tags.section_id)
11. 4.406 477.154 ↑ 2.8 3,118 1

Merge Left Join (cost=123,064.61..123,154.26 rows=8,716 width=907) (actual time=461.507..477.154 rows=3,118 loops=1)

  • Merge Cond: (contractors.id = sts.section_id)
12. 8.509 472.734 ↑ 2.8 3,118 1

Merge Left Join (cost=123,063.48..123,115.14 rows=8,716 width=875) (actual time=461.490..472.734 rows=3,118 loops=1)

  • Merge Cond: (contractors.id = fees_4.section_id)
13. 8.469 464.219 ↑ 2.8 3,118 1

Sort (cost=123,063.34..123,085.13 rows=8,716 width=843) (actual time=461.480..464.219 rows=3,118 loops=1)

  • Sort Key: contractors.id
  • Sort Method: quicksort Memory: 1208kB
14. 13.273 455.750 ↑ 2.8 3,118 1

Hash Left Join (cost=50,492.36..122,492.90 rows=8,716 width=843) (actual time=318.713..455.750 rows=3,118 loops=1)

  • Hash Cond: ((_contacts.id = address_to_section.section_id) AND ((SubPlan 45) = address_to_section.id))
15. 4.706 330.010 ↑ 2.8 3,118 1

Hash Left Join (cost=44,207.88..112,479.06 rows=8,716 width=847) (actual time=236.255..330.010 rows=3,118 loops=1)

  • Hash Cond: (contractors.contact_id = _contacts.id)
16. 4.243 221.168 ↑ 2.8 3,118 1

Hash Left Join (cost=37,197.15..105,445.45 rows=8,716 width=812) (actual time=131.811..221.168 rows=3,118 loops=1)

  • Hash Cond: (contractors.id = vw_actions.section_id)
17. 2.201 200.783 ↑ 1.0 3,118 1

Merge Left Join (cost=13,259.97..81,500.08 rows=3,118 width=804) (actual time=115.641..200.783 rows=3,118 loops=1)

  • Merge Cond: (contractors.id = fees_3.section_id)
18. 1.792 198.579 ↑ 1.0 3,118 1

Merge Left Join (cost=13,259.83..81,484.08 rows=3,118 width=772) (actual time=115.635..198.579 rows=3,118 loops=1)

  • Merge Cond: (contractors.id = fees_2.section_id)
19. 1.504 196.783 ↑ 1.0 3,118 1

Merge Left Join (cost=13,259.69..81,468.08 rows=3,118 width=740) (actual time=115.628..196.783 rows=3,118 loops=1)

  • Merge Cond: (contractors.id = fees_1.section_id)
20. 1.578 195.276 ↑ 1.0 3,118 1

Merge Left Join (cost=13,259.55..81,452.08 rows=3,118 width=708) (actual time=115.609..195.276 rows=3,118 loops=1)

  • Merge Cond: (contractors.id = fee_charges_2.section_id)
21. 1.395 193.675 ↑ 1.0 3,118 1

Merge Left Join (cost=11,754.44..79,930.38 rows=3,118 width=676) (actual time=115.582..193.675 rows=3,118 loops=1)

  • Merge Cond: (contractors.id = fees.section_id)
22. 1.696 192.275 ↑ 1.0 3,118 1

Merge Left Join (cost=11,754.30..79,914.39 rows=3,118 width=668) (actual time=115.574..192.275 rows=3,118 loops=1)

  • Merge Cond: (contractors.id = fee_charges_1.section_id)
23. 1.309 190.572 ↑ 1.0 3,118 1

Merge Left Join (cost=10,252.12..78,073.92 rows=3,118 width=572) (actual time=115.564..190.572 rows=3,118 loops=1)

  • Merge Cond: (contractors.id = fee_charges.section_id)
24. 1.483 189.251 ↑ 1.0 3,118 1

Merge Left Join (cost=10,251.70..77,744.34 rows=3,118 width=564) (actual time=115.549..189.251 rows=3,118 loops=1)

  • Merge Cond: (contractors.id = emails.section_id)
25. 1.865 187.762 ↑ 1.0 3,118 1

Merge Left Join (cost=10,251.55..77,728.34 rows=3,118 width=556) (actual time=115.541..187.762 rows=3,118 loops=1)

  • Merge Cond: (contractors.id = uploaded_documents.section_id)
26. 1.838 185.857 ↑ 1.0 3,118 1

Merge Left Join (cost=10,251.13..77,070.16 rows=3,118 width=540) (actual time=115.505..185.857 rows=3,118 loops=1)

  • Merge Cond: (contractors.id = subcases.section_id)
27. 3.761 180.229 ↑ 1.0 3,118 1

Nested Loop Left Join (cost=9,547.13..76,358.07 rows=3,118 width=508) (actual time=111.712..180.229 rows=3,118 loops=1)

28. 6.222 151.524 ↑ 1.0 3,118 1

Merge Left Join (cost=9,526.13..9,961.68 rows=3,118 width=476) (actual time=111.676..151.524 rows=3,118 loops=1)

  • Merge Cond: (contractors.id = gc_content.section_id)
29. 4.037 4.037 ↑ 1.0 3,118 1

Index Scan using contractors_id_idx on contractors (cost=0.28..264.55 rows=3,118 width=412) (actual time=0.019..4.037 rows=3,118 loops=1)

30. 1.797 141.265 ↓ 15.6 3,118 1

Materialize (cost=9,525.85..9,686.83 rows=200 width=68) (actual time=111.649..141.265 rows=3,118 loops=1)

31. 26.543 139.468 ↓ 15.6 3,118 1

GroupAggregate (cost=9,525.85..9,684.33 rows=200 width=76) (actual time=111.644..139.468 rows=3,118 loops=1)

  • Group Key: gc_content.section_id, gc_content.section
32. 2.437 112.925 ↓ 6.2 3,713 1

Sort (cost=9,525.85..9,527.35 rows=598 width=44) (actual time=111.588..112.925 rows=3,713 loops=1)

  • Sort Key: gc_content.section_id
  • Sort Method: quicksort Memory: 498kB
33. 0.559 110.488 ↓ 6.2 3,713 1

Subquery Scan on gc_content (cost=9,490.80..9,498.27 rows=598 width=44) (actual time=109.661..110.488 rows=3,713 loops=1)

34. 1.237 109.929 ↓ 6.2 3,713 1

Sort (cost=9,490.80..9,492.29 rows=598 width=48) (actual time=109.660..109.929 rows=3,713 loops=1)

  • Sort Key: groups_contacts_1.class_id
  • Sort Method: quicksort Memory: 520kB
35. 9.489 108.692 ↓ 6.2 3,713 1

HashAggregate (cost=9,455.74..9,463.22 rows=598 width=48) (actual time=107.255..108.692 rows=3,713 loops=1)

  • Group Key: groups_contacts_1.class_id, groups_contacts_1.section_id, groups_contacts_1.section
36. 3.344 99.203 ↑ 1.0 5,887 1

Nested Loop Left Join (cost=5,763.14..9,141.95 rows=5,977 width=47) (actual time=71.293..99.203 rows=5,887 loops=1)

  • Join Filter: ((address_to_section_1.section)::text = 'contacts'::text)
37. 3.989 78.198 ↑ 1.0 5,887 1

Hash Join (cost=5,762.72..5,936.05 rows=5,977 width=29) (actual time=71.246..78.198 rows=5,887 loops=1)

  • Hash Cond: (groups_contacts_1.address_to_section_id = address_to_section_1.id)
38. 0.674 3.279 ↑ 1.0 5,888 1

Append (cost=0.00..157.64 rows=5,977 width=20) (actual time=0.011..3.279 rows=5,888 loops=1)

39. 0.004 0.004 ↓ 0.0 0 1

Seq Scan on groups_contacts groups_contacts_1 (cost=0.00..0.00 rows=1 width=44) (actual time=0.004..0.004 rows=0 loops=1)

  • Filter: (active AND (class_id <> 2) AND ((section)::text = 'license'::text))
40. 2.601 2.601 ↑ 1.0 5,888 1

Seq Scan on groups_contacts__license groups_contacts__license_1 (cost=0.00..157.64 rows=5,976 width=20) (actual time=0.007..2.601 rows=5,888 loops=1)

  • Filter: (active AND (class_id <> 2) AND ((section)::text = 'license'::text))
41. 39.900 70.930 ↑ 1.0 176,121 1

Hash (cost=3,561.21..3,561.21 rows=176,121 width=21) (actual time=70.930..70.930 rows=176,121 loops=1)

  • Buckets: 262144 Batches: 1 Memory Usage: 11680kB
42. 31.030 31.030 ↑ 1.0 176,121 1

Seq Scan on address_to_section address_to_section_1 (cost=0.00..3,561.21 rows=176,121 width=21) (actual time=0.009..31.030 rows=176,121 loops=1)

43. 17.661 17.661 ↑ 1.0 1 5,887

Index Scan using _contacts_pkey on _contacts _contacts_1 (cost=0.42..0.52 rows=1 width=39) (actual time=0.003..0.003 rows=1 loops=5,887)

  • Index Cond: (address_to_section_1.section_id = id)
44. 3.118 24.944 ↓ 0.0 0 3,118

GroupAggregate (cost=21.00..21.27 rows=1 width=100) (actual time=0.008..0.008 rows=0 loops=3,118)

  • Group Key: pts.section, pts.section_id, proj.name
45. 6.236 21.826 ↓ 0.0 0 3,118

Sort (cost=21.00..21.01 rows=1 width=68) (actual time=0.007..0.007 rows=0 loops=3,118)

  • Sort Key: proj.name
  • Sort Method: quicksort Memory: 25kB
46. 6.236 15.590 ↓ 0.0 0 3,118

Nested Loop (cost=4.33..20.99 rows=1 width=68) (actual time=0.005..0.005 rows=0 loops=3,118)

47. 3.118 9.354 ↓ 0.0 0 3,118

Bitmap Heap Scan on projects_to_section pts (cost=4.19..12.67 rows=1 width=40) (actual time=0.003..0.003 rows=0 loops=3,118)

  • Recheck Cond: (section_id = contractors.id)
  • Filter: ((section)::text = 'license'::text)
48. 6.236 6.236 ↓ 0.0 0 3,118

Bitmap Index Scan on projects_to_section_id_idx (cost=0.00..4.19 rows=5 width=0) (actual time=0.002..0.002 rows=0 loops=3,118)

  • Index Cond: (section_id = contractors.id)
49. 0.000 0.000 ↓ 0.0 0

Index Scan using projects_idx on projects proj (cost=0.14..8.16 rows=1 width=36) (never executed)

  • Index Cond: (id = pts.project_id)
50. 0.002 3.790 ↓ 0.0 0 1

Materialize (cost=704.00..704.28 rows=1 width=36) (actual time=3.790..3.790 rows=0 loops=1)

51. 0.001 3.788 ↓ 0.0 0 1

GroupAggregate (cost=704.00..704.27 rows=1 width=44) (actual time=3.788..3.788 rows=0 loops=1)

  • Group Key: subcases.section, subcases.section_id
52. 0.006 3.787 ↓ 0.0 0 1

Sort (cost=704.00..704.00 rows=1 width=24) (actual time=3.787..3.787 rows=0 loops=1)

  • Sort Key: subcases.section_id
  • Sort Method: quicksort Memory: 25kB
53. 3.781 3.781 ↓ 0.0 0 1

Seq Scan on subcases (cost=0.00..703.99 rows=1 width=24) (actual time=3.781..3.781 rows=0 loops=1)

  • Filter: ((section)::text = 'license'::text)
  • Rows Removed by Filter: 30719
54. 0.004 0.040 ↑ 97.5 2 1

Materialize (cost=0.42..647.95 rows=195 width=20) (actual time=0.032..0.040 rows=2 loops=1)

55. 0.011 0.036 ↑ 97.5 2 1

GroupAggregate (cost=0.42..645.51 rows=195 width=30) (actual time=0.030..0.036 rows=2 loops=1)

  • Group Key: uploaded_documents.section, uploaded_documents.section_id
56. 0.025 0.025 ↑ 97.5 2 1

Index Scan using uploaded_documents_idx on uploaded_documents (cost=0.42..640.63 rows=195 width=26) (actual time=0.022..0.025 rows=2 loops=1)

  • Index Cond: ((section)::text = 'license'::text)
57. 0.001 0.006 ↓ 0.0 0 1

Materialize (cost=0.15..8.20 rows=1 width=12) (actual time=0.006..0.006 rows=0 loops=1)

58. 0.001 0.005 ↓ 0.0 0 1

GroupAggregate (cost=0.15..8.18 rows=1 width=44) (actual time=0.005..0.005 rows=0 loops=1)

  • Group Key: emails.section_id, emails.section
59. 0.004 0.004 ↓ 0.0 0 1

Index Scan using emails_idx on emails (cost=0.15..8.17 rows=1 width=44) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: ((section)::text = 'license'::text)
60. 0.001 0.012 ↓ 0.0 0 1

Materialize (cost=0.42..319.87 rows=153 width=12) (actual time=0.012..0.012 rows=0 loops=1)

61. 0.001 0.011 ↓ 0.0 0 1

GroupAggregate (cost=0.42..317.96 rows=153 width=20) (actual time=0.011..0.011 rows=0 loops=1)

  • Group Key: fee_charges.section, fee_charges.section_id
62. 0.010 0.010 ↓ 0.0 0 1

Index Scan using idx_fee_charges on fee_charges (cost=0.42..315.28 rows=153 width=16) (actual time=0.010..0.010 rows=0 loops=1)

  • Index Cond: ((section)::text = 'license'::text)
63. 0.001 0.007 ↓ 0.0 0 1

Materialize (cost=1,502.18..1,830.76 rows=153 width=100) (actual time=0.007..0.007 rows=0 loops=1)

64. 0.000 0.006 ↓ 0.0 0 1

Merge Left Join (cost=1,502.18..1,830.37 rows=153 width=100) (actual time=0.006..0.006 rows=0 loops=1)

  • Merge Cond: (fee_charges_1.section_id = fc.section_id)
  • Join Filter: ((fc.section)::text = (fee_charges_1.section)::text)
65. 0.001 0.006 ↓ 0.0 0 1

GroupAggregate (cost=0.42..318.34 rows=153 width=44) (actual time=0.006..0.006 rows=0 loops=1)

  • Group Key: fee_charges_1.section, fee_charges_1.section_id
66. 0.005 0.005 ↓ 0.0 0 1

Index Scan using idx_fee_charges on fee_charges fee_charges_1 (cost=0.42..315.28 rows=153 width=17) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: ((section)::text = 'license'::text)
67. 0.000 0.000 ↓ 0.0 0

Materialize (cost=1,501.76..1,507.56 rows=145 width=44) (never executed)

68. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=1,501.76..1,505.75 rows=145 width=44) (never executed)

  • Group Key: fc.section_id, fc.section
69. 0.000 0.000 ↓ 0.0 0

Sort (cost=1,501.76..1,502.12 rows=145 width=21) (never executed)

  • Sort Key: fc.section_id
70. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=317.49..1,496.56 rows=145 width=21) (never executed)

71. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=317.19..1,442.16 rows=145 width=16) (never executed)

  • Hash Cond: (fcp.fee_charge_id = fc.id)
72. 0.000 0.000 ↓ 0.0 0

Seq Scan on fee_charge_payments fcp (cost=0.00..951.77 rows=65,977 width=8) (never executed)

73. 0.000 0.000 ↓ 0.0 0

Hash (cost=315.28..315.28 rows=153 width=16) (never executed)

74. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_fee_charges on fee_charges fc (cost=0.42..315.28 rows=153 width=16) (never executed)

  • Index Cond: ((section)::text = 'license'::text)
75. 0.000 0.000 ↓ 0.0 0

Index Scan using fee_transactions_pkey on payments p (cost=0.29..0.38 rows=1 width=13) (never executed)

  • Index Cond: (id = fcp.payment_id)
76. 0.002 0.005 ↓ 0.0 0 1

GroupAggregate (cost=0.14..8.18 rows=1 width=16) (actual time=0.004..0.005 rows=0 loops=1)

  • Group Key: fees.section_id
77. 0.003 0.003 ↓ 0.0 0 1

Index Scan using fees_idx on fees (cost=0.14..8.16 rows=1 width=16) (actual time=0.003..0.003 rows=0 loops=1)

  • Index Cond: ((section)::text = 'license'::text)
  • Filter: ((account)::text <> 'payment'::text)
78. 0.001 0.023 ↓ 0.0 0 1

GroupAggregate (cost=1,505.11..1,510.46 rows=153 width=36) (actual time=0.023..0.023 rows=0 loops=1)

  • Group Key: fee_charges_2.section_id
79. 0.005 0.022 ↓ 0.0 0 1

Sort (cost=1,505.11..1,505.49 rows=153 width=13) (actual time=0.022..0.022 rows=0 loops=1)

  • Sort Key: fee_charges_2.section_id
  • Sort Method: quicksort Memory: 25kB
80. 0.000 0.017 ↓ 0.0 0 1

Nested Loop Left Join (cost=317.49..1,499.56 rows=153 width=13) (actual time=0.017..0.017 rows=0 loops=1)

81. 0.010 0.017 ↓ 0.0 0 1

Hash Right Join (cost=317.19..1,442.16 rows=153 width=8) (actual time=0.017..0.017 rows=0 loops=1)

  • Hash Cond: (fee_payments.fee_charge_id = fee_charges_2.id)
82. 0.000 0.000 ↓ 0.0 0

Seq Scan on fee_charge_payments fee_payments (cost=0.00..951.77 rows=65,977 width=8) (never executed)

83. 0.001 0.007 ↓ 0.0 0 1

Hash (cost=315.28..315.28 rows=153 width=8) (actual time=0.007..0.007 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
84. 0.006 0.006 ↓ 0.0 0 1

Index Scan using idx_fee_charges on fee_charges fee_charges_2 (cost=0.42..315.28 rows=153 width=8) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: ((section)::text = 'license'::text)
  • Filter: (NOT deleted)
85. 0.000 0.000 ↓ 0.0 0

Index Scan using fee_transactions_pkey on payments (cost=0.29..0.38 rows=1 width=13) (never executed)

  • Index Cond: (fee_payments.payment_id = id)
86. 0.000 0.003 ↓ 0.0 0 1

GroupAggregate (cost=0.14..8.19 rows=1 width=40) (actual time=0.003..0.003 rows=0 loops=1)

  • Group Key: fees_1.section_id
87. 0.003 0.003 ↓ 0.0 0 1

Index Scan using fees_idx on fees fees_1 (cost=0.14..8.16 rows=1 width=54) (actual time=0.003..0.003 rows=0 loops=1)

  • Index Cond: ((section)::text = 'license'::text)
  • Filter: ((account)::text = 'deposit'::text)
88. 0.001 0.004 ↓ 0.0 0 1

GroupAggregate (cost=0.14..8.18 rows=1 width=40) (actual time=0.004..0.004 rows=0 loops=1)

  • Group Key: fees_2.section_id
89. 0.003 0.003 ↓ 0.0 0 1

Index Scan using fees_idx on fees fees_2 (cost=0.14..8.16 rows=1 width=54) (actual time=0.003..0.003 rows=0 loops=1)

  • Index Cond: ((section)::text = 'license'::text)
  • Filter: ((account)::text = 'payment'::text)
90. 0.001 0.003 ↓ 0.0 0 1

GroupAggregate (cost=0.14..8.18 rows=1 width=40) (actual time=0.003..0.003 rows=0 loops=1)

  • Group Key: fees_3.section_id
91. 0.002 0.002 ↓ 0.0 0 1

Index Scan using fees_idx on fees fees_3 (cost=0.14..8.16 rows=1 width=54) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: ((section)::text = 'license'::text)
  • Filter: ((account)::text = 'payment escrow'::text)
92. 0.358 16.142 ↑ 5.3 1,649 1

Hash (cost=23,828.23..23,828.23 rows=8,716 width=16) (actual time=16.142..16.142 rows=1,649 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 206kB
93. 0.233 15.784 ↑ 5.3 1,649 1

Subquery Scan on vw_actions (cost=23,653.91..23,828.23 rows=8,716 width=16) (actual time=15.196..15.784 rows=1,649 loops=1)

94. 3.139 15.551 ↑ 5.3 1,649 1

HashAggregate (cost=23,653.91..23,741.07 rows=8,716 width=16) (actual time=15.195..15.551 rows=1,649 loops=1)

  • Group Key: actions.section_id
95. 10.987 12.412 ↓ 1.0 9,387 1

Bitmap Heap Scan on actions (cost=288.91..23,607.15 rows=9,352 width=16) (actual time=2.261..12.412 rows=9,387 loops=1)

  • Recheck Cond: ((section)::text = 'license'::text)
  • Heap Blocks: exact=6026
96. 1.425 1.425 ↓ 1.0 9,387 1

Bitmap Index Scan on actions_idx (cost=0.00..286.57 rows=9,352 width=0) (actual time=1.425..1.425 rows=9,387 loops=1)

  • Index Cond: ((section)::text = 'license'::text)
97. 49.436 104.136 ↑ 1.0 162,477 1

Hash (cost=4,979.77..4,979.77 rows=162,477 width=35) (actual time=104.136..104.136 rows=162,477 loops=1)

  • Buckets: 262144 Batches: 1 Memory Usage: 13378kB
98. 54.700 54.700 ↑ 1.0 162,477 1

Seq Scan on _contacts (cost=0.00..4,979.77 rows=162,477 width=35) (actual time=0.018..54.700 rows=162,477 loops=1)

99. 40.516 81.292 ↓ 1.0 152,435 1

Hash (cost=4,001.51..4,001.51 rows=152,198 width=16) (actual time=81.292..81.292 rows=152,435 loops=1)

  • Buckets: 262144 Batches: 1 Memory Usage: 9789kB
100. 40.776 40.776 ↓ 1.0 152,441 1

Seq Scan on address_to_section (cost=0.00..4,001.51 rows=152,198 width=16) (actual time=0.019..40.776 rows=152,441 loops=1)

  • Filter: ((section)::text = 'contacts'::text)
  • Rows Removed by Filter: 23680
101.          

SubPlan (for Hash Left Join)

102. 6.235 31.175 ↑ 1.0 1 6,235

Aggregate (cost=8.44..8.45 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=6,235)

103. 24.940 24.940 ↑ 1.0 1 6,235

Index Scan using address_to_section_section_id_section_idx on address_to_section address_to_section_19 (cost=0.42..8.44 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=6,235)

  • Index Cond: ((_contacts.id = section_id) AND ((section)::text = 'contacts'::text))
104. 0.001 0.006 ↓ 0.0 0 1

GroupAggregate (cost=0.14..8.18 rows=1 width=40) (actual time=0.006..0.006 rows=0 loops=1)

  • Group Key: fees_4.section_id
105. 0.005 0.005 ↓ 0.0 0 1

Index Scan using fees_idx on fees fees_4 (cost=0.14..8.16 rows=1 width=54) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: ((section)::text = 'license'::text)
  • Filter: ((account)::text = 'payment escrow'::text)
106. 0.000 0.014 ↓ 0.0 0 1

Unique (cost=1.12..17.28 rows=1 width=478) (actual time=0.014..0.014 rows=0 loops=1)

107. 0.001 0.014 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.12..17.28 rows=1 width=478) (actual time=0.014..0.014 rows=0 loops=1)

108. 0.000 0.013 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.70..16.36 rows=1 width=60) (actual time=0.013..0.013 rows=0 loops=1)

109. 0.013 0.013 ↓ 0.0 0 1

Index Scan using section_to_section_section_section_id_idx on section_to_section sts (cost=0.42..8.06 rows=1 width=60) (actual time=0.013..0.013 rows=0 loops=1)

  • Index Cond: ((section)::text = 'license'::text)
  • Filter: ("primary" AND ((to_section)::text = 'properties'::text) AND ((rel_type)::text = 'property'::text))
110. 0.000 0.000 ↓ 0.0 0

Index Only Scan using parcel_cases_pkey on parcel_cases p_1 (cost=0.29..8.30 rows=1 width=4) (never executed)

  • Index Cond: (parcel_id = sts.to_section_id)
  • Heap Fetches: 0
111. 0.000 0.000 ↓ 0.0 0

Index Scan using address_to_section_section_id_section_idx on address_to_section ats (cost=0.42..0.86 rows=1 width=8) (never executed)

  • Index Cond: ((section_id = p_1.parcel_id) AND ((section)::text = 'properties'::text))
112. 0.003 0.021 ↓ 0.0 0 1

Materialize (cost=18.27..19.11 rows=3 width=36) (actual time=0.021..0.021 rows=0 loops=1)

113. 0.001 0.018 ↓ 0.0 0 1

GroupAggregate (cost=18.27..19.08 rows=3 width=94) (actual time=0.018..0.018 rows=0 loops=1)

  • Group Key: case_tags.section, case_tags.section_id
114. 0.005 0.017 ↓ 0.0 0 1

Sort (cost=18.27..18.28 rows=3 width=94) (actual time=0.017..0.017 rows=0 loops=1)

  • Sort Key: case_tags.section_id
  • Sort Method: quicksort Memory: 25kB
115. 0.012 0.012 ↓ 0.0 0 1

Seq Scan on case_tags (cost=0.00..18.25 rows=3 width=94) (actual time=0.012..0.012 rows=0 loops=1)

  • Filter: ((section)::text = 'license'::text)
  • Rows Removed by Filter: 15
116. 28.062 28.062 ↑ 1.0 1 3,118

Index Scan using address_pkey on address (cost=0.42..0.53 rows=1 width=45) (actual time=0.009..0.009 rows=1 loops=3,118)

  • Index Cond: (address_to_section.address_id = id)
117. 70.656 200.192 ↑ 1.0 1 5,888

GroupAggregate (cost=0.42..8.51 rows=1 width=388) (actual time=0.033..0.034 rows=1 loops=5,888)

  • Group Key: additional_info.section_id
118. 129.536 129.536 ↓ 5.0 5 5,888

Index Scan using additional_info_idx on additional_info (cost=0.42..8.44 rows=1 width=31) (actual time=0.014..0.022 rows=5 loops=5,888)

  • Index Cond: (((section)::text = 'license'::text) AND (section_id = contractors.id))
119.          

SubPlan (for Nested Loop Left Join)

120. 0.000 41.216 ↓ 0.0 0 5,888

Limit (cost=0.57..16.61 rows=1 width=13) (actual time=0.007..0.007 rows=0 loops=5,888)

121. 5.888 41.216 ↓ 0.0 0 5,888

Nested Loop Left Join (cost=0.57..16.61 rows=1 width=13) (actual time=0.007..0.007 rows=0 loops=5,888)

122. 35.328 35.328 ↓ 0.0 0 5,888

Index Scan using case_to_parent_section_idx on case_to_parent ctp (cost=0.29..8.31 rows=1 width=4) (actual time=0.006..0.006 rows=0 loops=5,888)

  • Index Cond: ((section)::text = 'license'::text)
  • Filter: ((section_id = contractors.id) OR (parent_section_id = contractors.id))
123. 0.000 0.000 ↓ 0.0 0

Index Scan using contractors_id_idx on contractors jpt (cost=0.28..8.30 rows=1 width=21) (never executed)

  • Index Cond: (id = ctp.parent_section_id)
124. 0.000 23.552 ↓ 0.0 0 5,888

Limit (cost=0.57..16.61 rows=1 width=1) (actual time=0.004..0.004 rows=0 loops=5,888)

125. 5.888 23.552 ↓ 0.0 0 5,888

Nested Loop Left Join (cost=0.57..16.61 rows=1 width=1) (actual time=0.004..0.004 rows=0 loops=5,888)

126. 17.664 17.664 ↓ 0.0 0 5,888

Index Scan using case_to_parent_section_idx on case_to_parent ctp_1 (cost=0.29..8.31 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=5,888)

  • Index Cond: ((section)::text = 'license'::text)
  • Filter: ((section_id = contractors.id) OR (parent_section_id = contractors.id))
127. 0.000 0.000 ↓ 0.0 0

Index Scan using contractors_id_idx on contractors jpt_1 (cost=0.28..8.30 rows=1 width=9) (never executed)

  • Index Cond: (id = ctp_1.parent_section_id)
128. 5.888 23.552 ↑ 1.0 1 5,888

Aggregate (cost=8.31..8.32 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=5,888)

129. 17.664 17.664 ↓ 0.0 0 5,888

Index Scan using case_to_parent_section_idx on case_to_parent (cost=0.29..8.30 rows=1 width=0) (actual time=0.003..0.003 rows=0 loops=5,888)

  • Index Cond: ((section)::text = 'license'::text)
  • Filter: (section_id = contractors.id)
130. 35.328 84,298.496 ↑ 1.0 1 5,888

Aggregate (cost=2,430.57..2,430.58 rows=1 width=8) (actual time=14.317..14.317 rows=1 loops=5,888)

131. 35.328 84,263.168 ↑ 6.4 14 5,888

Append (cost=0.00..2,430.34 rows=90 width=8) (actual time=8.617..14.311 rows=14 loops=5,888)

132. 0.000 0.000 ↓ 0.0 0 5,888

Seq Scan on groups_contacts groups_contacts_2 (cost=0.00..0.00 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=5,888)

  • Filter: ((permit_contractor_id = contractors.id) AND ((section)::text = 'permits'::text))
133. 84,227.840 84,227.840 ↑ 6.4 14 5,888

Seq Scan on groups_contacts__permits (cost=0.00..2,430.34 rows=89 width=8) (actual time=8.613..14.305 rows=14 loops=5,888)

  • Filter: ((permit_contractor_id = contractors.id) AND ((section)::text = 'permits'::text))
  • Rows Removed by Filter: 92142
134. 29.440 83,403.520 ↑ 1.0 1 5,888

Aggregate (cost=2,430.57..2,430.58 rows=1 width=8) (actual time=14.165..14.165 rows=1 loops=5,888)

135. 47.104 83,374.080 ↑ 6.4 14 5,888

Append (cost=0.00..2,430.34 rows=90 width=8) (actual time=8.528..14.160 rows=14 loops=5,888)

136. 0.000 0.000 ↓ 0.0 0 5,888

Seq Scan on groups_contacts groups_contacts_3 (cost=0.00..0.00 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=5,888)

  • Filter: ((permit_contractor_id = contractors.id) AND ((section)::text = 'permits'::text))
137. 83,326.976 83,326.976 ↑ 6.4 14 5,888

Seq Scan on groups_contacts__permits groups_contacts__permits_1 (cost=0.00..2,430.34 rows=89 width=8) (actual time=8.522..14.152 rows=14 loops=5,888)

  • Filter: ((permit_contractor_id = contractors.id) AND ((section)::text = 'permits'::text))
  • Rows Removed by Filter: 92142
138. 23.552 123.648 ↑ 1.0 1 5,888

Limit (cost=0.42..8.44 rows=1 width=32) (actual time=0.020..0.021 rows=1 loops=5,888)

139. 100.096 100.096 ↑ 1.0 1 5,888

Index Scan using _contacts_pkey on _contacts _contacts_2 (cost=0.42..8.44 rows=1 width=32) (actual time=0.017..0.017 rows=1 loops=5,888)

  • Index Cond: (contractors.contact_id = id)
140. 5.888 23.552 ↑ 1.0 1 5,888

Limit (cost=0.42..8.44 rows=1 width=32) (actual time=0.004..0.004 rows=1 loops=5,888)

141. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using _contacts_pkey on _contacts _contacts_3 (cost=0.42..8.44 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=5,888)

  • Index Cond: (contractors.contact_id = id)
142. 5.888 23.552 ↑ 1.0 1 5,888

Limit (cost=0.42..8.44 rows=1 width=9) (actual time=0.004..0.004 rows=1 loops=5,888)

143. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using _contacts_pkey on _contacts _contacts_4 (cost=0.42..8.44 rows=1 width=9) (actual time=0.003..0.003 rows=1 loops=5,888)

  • Index Cond: (contractors.contact_id = id)
144. 5.888 23.552 ↑ 1.0 1 5,888

Limit (cost=0.42..8.44 rows=1 width=1) (actual time=0.003..0.004 rows=1 loops=5,888)

145. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using _contacts_pkey on _contacts _contacts_5 (cost=0.42..8.44 rows=1 width=1) (actual time=0.002..0.003 rows=1 loops=5,888)

  • Index Cond: (contractors.contact_id = id)
146. 5.888 23.552 ↑ 1.0 1 5,888

Limit (cost=0.42..8.44 rows=1 width=1) (actual time=0.003..0.004 rows=1 loops=5,888)

147. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using _contacts_pkey on _contacts _contacts_6 (cost=0.42..8.44 rows=1 width=1) (actual time=0.002..0.003 rows=1 loops=5,888)

  • Index Cond: (contractors.contact_id = id)
148. 5.888 23.552 ↑ 1.0 1 5,888

Limit (cost=0.42..8.44 rows=1 width=18) (actual time=0.003..0.004 rows=1 loops=5,888)

149. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using _contacts_pkey on _contacts _contacts_7 (cost=0.42..8.44 rows=1 width=18) (actual time=0.002..0.003 rows=1 loops=5,888)

  • Index Cond: (contractors.contact_id = id)
150. 5.888 23.552 ↑ 1.0 1 5,888

Limit (cost=0.42..8.44 rows=1 width=1) (actual time=0.003..0.004 rows=1 loops=5,888)

151. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using _contacts_pkey on _contacts _contacts_8 (cost=0.42..8.44 rows=1 width=1) (actual time=0.002..0.003 rows=1 loops=5,888)

  • Index Cond: (contractors.contact_id = id)
152. 5.888 17.664 ↑ 1.0 1 5,888

Limit (cost=0.42..8.44 rows=1 width=2) (actual time=0.003..0.003 rows=1 loops=5,888)

153. 11.776 11.776 ↑ 1.0 1 5,888

Index Scan using _contacts_pkey on _contacts _contacts_9 (cost=0.42..8.44 rows=1 width=2) (actual time=0.002..0.002 rows=1 loops=5,888)

  • Index Cond: (contractors.contact_id = id)
154. 5.888 23.552 ↑ 1.0 1 5,888

Limit (cost=0.42..8.44 rows=1 width=5) (actual time=0.003..0.004 rows=1 loops=5,888)

155. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using _contacts_pkey on _contacts _contacts_10 (cost=0.42..8.44 rows=1 width=5) (actual time=0.003..0.003 rows=1 loops=5,888)

  • Index Cond: (contractors.contact_id = id)
156. 0.000 17.664 ↑ 1.0 1 5,888

Limit (cost=0.42..8.44 rows=1 width=5) (actual time=0.003..0.003 rows=1 loops=5,888)

157. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using _contacts_pkey on _contacts _contacts_11 (cost=0.42..8.44 rows=1 width=5) (actual time=0.002..0.003 rows=1 loops=5,888)

  • Index Cond: (contractors.contact_id = id)
158. 0.000 17.664 ↑ 1.0 1 5,888

Limit (cost=0.42..8.44 rows=1 width=2) (actual time=0.003..0.003 rows=1 loops=5,888)

159. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using _contacts_pkey on _contacts _contacts_12 (cost=0.42..8.44 rows=1 width=2) (actual time=0.002..0.003 rows=1 loops=5,888)

  • Index Cond: (contractors.contact_id = id)
160. 5.888 23.552 ↑ 1.0 1 5,888

Limit (cost=0.42..8.44 rows=1 width=2) (actual time=0.003..0.004 rows=1 loops=5,888)

161. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using _contacts_pkey on _contacts _contacts_13 (cost=0.42..8.44 rows=1 width=2) (actual time=0.003..0.003 rows=1 loops=5,888)

  • Index Cond: (contractors.contact_id = id)
162. 5.888 23.552 ↑ 1.0 1 5,888

Limit (cost=0.42..8.44 rows=1 width=2) (actual time=0.003..0.004 rows=1 loops=5,888)

163. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using _contacts_pkey on _contacts _contacts_14 (cost=0.42..8.44 rows=1 width=2) (actual time=0.002..0.003 rows=1 loops=5,888)

  • Index Cond: (contractors.contact_id = id)
164. 5.888 17.664 ↑ 1.0 1 5,888

Limit (cost=0.42..8.44 rows=1 width=1) (actual time=0.003..0.003 rows=1 loops=5,888)

165. 11.776 11.776 ↑ 1.0 1 5,888

Index Scan using _contacts_pkey on _contacts _contacts_15 (cost=0.42..8.44 rows=1 width=1) (actual time=0.002..0.002 rows=1 loops=5,888)

  • Index Cond: (contractors.contact_id = id)
166. 5.888 23.552 ↑ 1.0 1 5,888

Limit (cost=0.42..8.44 rows=1 width=4) (actual time=0.003..0.004 rows=1 loops=5,888)

167. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using _contacts_pkey on _contacts _contacts_16 (cost=0.42..8.44 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=5,888)

  • Index Cond: (contractors.contact_id = id)
168. 5.888 23.552 ↑ 1.0 1 5,888

Limit (cost=0.42..8.44 rows=1 width=19) (actual time=0.003..0.004 rows=1 loops=5,888)

169. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using _contacts_pkey on _contacts _contacts_17 (cost=0.42..8.44 rows=1 width=19) (actual time=0.003..0.003 rows=1 loops=5,888)

  • Index Cond: (contractors.contact_id = id)
170. 5.888 23.552 ↑ 1.0 1 5,888

Limit (cost=0.42..8.44 rows=1 width=7) (actual time=0.003..0.004 rows=1 loops=5,888)

171. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using _contacts_pkey on _contacts _contacts_18 (cost=0.42..8.44 rows=1 width=7) (actual time=0.003..0.003 rows=1 loops=5,888)

  • Index Cond: (contractors.contact_id = id)
172. 17.664 270.848 ↑ 1.0 1 5,888

Limit (cost=0.84..15.03 rows=1 width=37) (actual time=0.044..0.046 rows=1 loops=5,888)

173. 11.846 253.184 ↑ 2.0 1 5,888

Nested Loop Left Join (cost=0.84..29.21 rows=2 width=37) (actual time=0.043..0.043 rows=1 loops=5,888)

174. 17.664 200.192 ↑ 2.0 1 5,888

Nested Loop (cost=0.42..28.18 rows=2 width=4) (actual time=0.033..0.034 rows=1 loops=5,888)

175. 47.104 135.424 ↑ 2.0 1 5,888

Append (cost=0.00..11.31 rows=2 width=4) (actual time=0.023..0.023 rows=1 loops=5,888)

176. 0.000 0.000 ↓ 0.0 0 5,888

Seq Scan on groups_contacts groups_contacts_4 (cost=0.00..0.00 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=5,888)

  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text) AND (section_id = contractors.id))
177. 35.328 88.320 ↑ 1.0 1 5,888

Bitmap Heap Scan on groups_contacts__license groups_contacts__license_2 (cost=4.30..11.31 rows=1 width=4) (actual time=0.015..0.015 rows=1 loops=5,888)

  • Recheck Cond: (section_id = contractors.id)
  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=6467
178. 52.992 52.992 ↓ 1.5 3 5,888

Bitmap Index Scan on idx_groups_contacts__license_section_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.009..0.009 rows=3 loops=5,888)

  • Index Cond: (section_id = contractors.id)
179. 47.104 47.104 ↑ 1.0 1 5,888

Index Scan using address_to_section_pkey on address_to_section address_to_section_2 (cost=0.42..8.44 rows=1 width=25) (actual time=0.008..0.008 rows=1 loops=5,888)

  • Index Cond: (id = groups_contacts_4.address_to_section_id)
180. 41.146 41.146 ↑ 1.0 1 5,878

Index Scan using address_pkey on address address_1 (cost=0.42..0.51 rows=1 width=45) (actual time=0.007..0.007 rows=1 loops=5,878)

  • Index Cond: (address_to_section_2.address_id = id)
181. 11.776 94.208 ↑ 1.0 1 5,888

Limit (cost=0.42..14.30 rows=1 width=4) (actual time=0.015..0.016 rows=1 loops=5,888)

182. 5.888 82.432 ↑ 2.0 1 5,888

Nested Loop (cost=0.42..28.18 rows=2 width=4) (actual time=0.014..0.014 rows=1 loops=5,888)

183. 23.552 58.880 ↑ 2.0 1 5,888

Append (cost=0.00..11.31 rows=2 width=8) (actual time=0.009..0.010 rows=1 loops=5,888)

184. 0.000 0.000 ↓ 0.0 0 5,888

Seq Scan on groups_contacts groups_contacts_5 (cost=0.00..0.00 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=5,888)

  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text) AND (section_id = contractors.id))
185. 17.664 35.328 ↑ 1.0 1 5,888

Bitmap Heap Scan on groups_contacts__license groups_contacts__license_3 (cost=4.30..11.31 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=5,888)

  • Recheck Cond: (section_id = contractors.id)
  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=6467
186. 17.664 17.664 ↓ 1.5 3 5,888

Bitmap Index Scan on idx_groups_contacts__license_section_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.003..0.003 rows=3 loops=5,888)

  • Index Cond: (section_id = contractors.id)
187. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using address_to_section_pkey on address_to_section address_to_section_3 (cost=0.42..8.44 rows=1 width=25) (actual time=0.003..0.003 rows=1 loops=5,888)

  • Index Cond: (id = groups_contacts_5.address_to_section_id)
188. 11.776 88.320 ↑ 1.0 1 5,888

Limit (cost=0.42..14.30 rows=1 width=4) (actual time=0.014..0.015 rows=1 loops=5,888)

189. 5.888 76.544 ↑ 2.0 1 5,888

Nested Loop (cost=0.42..28.18 rows=2 width=4) (actual time=0.013..0.013 rows=1 loops=5,888)

190. 17.664 52.992 ↑ 2.0 1 5,888

Append (cost=0.00..11.31 rows=2 width=4) (actual time=0.009..0.009 rows=1 loops=5,888)

191. 0.000 0.000 ↓ 0.0 0 5,888

Seq Scan on groups_contacts groups_contacts_6 (cost=0.00..0.00 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=5,888)

  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text) AND (section_id = contractors.id))
192. 17.664 35.328 ↑ 1.0 1 5,888

Bitmap Heap Scan on groups_contacts__license groups_contacts__license_4 (cost=4.30..11.31 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=5,888)

  • Recheck Cond: (section_id = contractors.id)
  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=6467
193. 17.664 17.664 ↓ 1.5 3 5,888

Bitmap Index Scan on idx_groups_contacts__license_section_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.003..0.003 rows=3 loops=5,888)

  • Index Cond: (section_id = contractors.id)
194. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using address_to_section_pkey on address_to_section address_to_section_4 (cost=0.42..8.44 rows=1 width=25) (actual time=0.003..0.003 rows=1 loops=5,888)

  • Index Cond: (id = groups_contacts_6.address_to_section_id)
195. 11.776 88.320 ↑ 1.0 1 5,888

Limit (cost=0.42..14.30 rows=1 width=1) (actual time=0.014..0.015 rows=1 loops=5,888)

196. 5.888 76.544 ↑ 2.0 1 5,888

Nested Loop (cost=0.42..28.18 rows=2 width=1) (actual time=0.013..0.013 rows=1 loops=5,888)

197. 17.664 52.992 ↑ 2.0 1 5,888

Append (cost=0.00..11.31 rows=2 width=5) (actual time=0.009..0.009 rows=1 loops=5,888)

198. 0.000 0.000 ↓ 0.0 0 5,888

Seq Scan on groups_contacts groups_contacts_7 (cost=0.00..0.00 rows=1 width=5) (actual time=0.000..0.000 rows=0 loops=5,888)

  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text) AND (section_id = contractors.id))
199. 17.664 35.328 ↑ 1.0 1 5,888

Bitmap Heap Scan on groups_contacts__license groups_contacts__license_5 (cost=4.30..11.31 rows=1 width=5) (actual time=0.006..0.006 rows=1 loops=5,888)

  • Recheck Cond: (section_id = contractors.id)
  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=6467
200. 17.664 17.664 ↓ 1.5 3 5,888

Bitmap Index Scan on idx_groups_contacts__license_section_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.003..0.003 rows=3 loops=5,888)

  • Index Cond: (section_id = contractors.id)
201. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using address_to_section_pkey on address_to_section address_to_section_5 (cost=0.42..8.44 rows=1 width=25) (actual time=0.002..0.003 rows=1 loops=5,888)

  • Index Cond: (id = groups_contacts_7.address_to_section_id)
202. 11.776 229.632 ↑ 1.0 1 5,888

Limit (cost=0.42..18.28 rows=1 width=10) (actual time=0.037..0.039 rows=1 loops=5,888)

203. 88.410 217.856 ↑ 2.0 1 5,888

Nested Loop Left Join (cost=0.42..36.13 rows=2 width=10) (actual time=0.037..0.037 rows=1 loops=5,888)

  • Join Filter: (groups_contacts_8.class_id = groups.group_id)
  • Rows Removed by Join Filter: 133
204. 5.888 76.544 ↑ 2.0 1 5,888

Nested Loop (cost=0.42..28.18 rows=2 width=4) (actual time=0.013..0.013 rows=1 loops=5,888)

205. 17.664 52.992 ↑ 2.0 1 5,888

Append (cost=0.00..11.31 rows=2 width=8) (actual time=0.009..0.009 rows=1 loops=5,888)

206. 0.000 0.000 ↓ 0.0 0 5,888

Seq Scan on groups_contacts groups_contacts_8 (cost=0.00..0.00 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=5,888)

  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text) AND (section_id = contractors.id))
207. 17.664 35.328 ↑ 1.0 1 5,888

Bitmap Heap Scan on groups_contacts__license groups_contacts__license_6 (cost=4.30..11.31 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=5,888)

  • Recheck Cond: (section_id = contractors.id)
  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=6467
208. 17.664 17.664 ↓ 1.5 3 5,888

Bitmap Index Scan on idx_groups_contacts__license_section_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.003..0.003 rows=3 loops=5,888)

  • Index Cond: (section_id = contractors.id)
209. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using address_to_section_pkey on address_to_section address_to_section_6 (cost=0.42..8.44 rows=1 width=25) (actual time=0.002..0.003 rows=1 loops=5,888)

  • Index Cond: (id = groups_contacts_8.address_to_section_id)
210. 52.587 52.902 ↑ 1.0 134 5,878

Materialize (cost=0.00..4.10 rows=140 width=14) (actual time=0.001..0.009 rows=134 loops=5,878)

211. 0.315 0.315 ↑ 1.0 134 1

Seq Scan on groups (cost=0.00..3.40 rows=140 width=14) (actual time=0.012..0.315 rows=134 loops=1)

212. 11.776 117.760 ↑ 1.0 1 5,888

Limit (cost=0.84..15.03 rows=1 width=4) (actual time=0.019..0.020 rows=1 loops=5,888)

213. 5.918 105.984 ↑ 2.0 1 5,888

Nested Loop Left Join (cost=0.84..29.21 rows=2 width=4) (actual time=0.018..0.018 rows=1 loops=5,888)

214. 11.776 82.432 ↑ 2.0 1 5,888

Nested Loop (cost=0.42..28.18 rows=2 width=4) (actual time=0.014..0.014 rows=1 loops=5,888)

215. 17.664 52.992 ↑ 2.0 1 5,888

Append (cost=0.00..11.31 rows=2 width=4) (actual time=0.009..0.009 rows=1 loops=5,888)

216. 0.000 0.000 ↓ 0.0 0 5,888

Seq Scan on groups_contacts groups_contacts_9 (cost=0.00..0.00 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=5,888)

  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text) AND (section_id = contractors.id))
217. 17.664 35.328 ↑ 1.0 1 5,888

Bitmap Heap Scan on groups_contacts__license groups_contacts__license_7 (cost=4.30..11.31 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=5,888)

  • Recheck Cond: (section_id = contractors.id)
  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=6467
218. 17.664 17.664 ↓ 1.5 3 5,888

Bitmap Index Scan on idx_groups_contacts__license_section_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.003..0.003 rows=3 loops=5,888)

  • Index Cond: (section_id = contractors.id)
219. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using address_to_section_pkey on address_to_section address_to_section_7 (cost=0.42..8.44 rows=1 width=25) (actual time=0.002..0.003 rows=1 loops=5,888)

  • Index Cond: (id = groups_contacts_9.address_to_section_id)
220. 17.634 17.634 ↑ 1.0 1 5,878

Index Scan using address_pkey on address address_2 (cost=0.42..0.51 rows=1 width=12) (actual time=0.003..0.003 rows=1 loops=5,878)

  • Index Cond: (address_to_section_7.address_id = id)
221. 11.776 111.872 ↑ 1.0 1 5,888

Limit (cost=0.84..15.03 rows=1 width=12) (actual time=0.018..0.019 rows=1 loops=5,888)

222. 11.796 100.096 ↑ 2.0 1 5,888

Nested Loop Left Join (cost=0.84..29.21 rows=2 width=12) (actual time=0.017..0.017 rows=1 loops=5,888)

223. 11.776 76.544 ↑ 2.0 1 5,888

Nested Loop (cost=0.42..28.18 rows=2 width=4) (actual time=0.013..0.013 rows=1 loops=5,888)

224. 17.664 52.992 ↑ 2.0 1 5,888

Append (cost=0.00..11.31 rows=2 width=4) (actual time=0.009..0.009 rows=1 loops=5,888)

225. 0.000 0.000 ↓ 0.0 0 5,888

Seq Scan on groups_contacts groups_contacts_10 (cost=0.00..0.00 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=5,888)

  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text) AND (section_id = contractors.id))
226. 17.664 35.328 ↑ 1.0 1 5,888

Bitmap Heap Scan on groups_contacts__license groups_contacts__license_8 (cost=4.30..11.31 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=5,888)

  • Recheck Cond: (section_id = contractors.id)
  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=6467
227. 17.664 17.664 ↓ 1.5 3 5,888

Bitmap Index Scan on idx_groups_contacts__license_section_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.003..0.003 rows=3 loops=5,888)

  • Index Cond: (section_id = contractors.id)
228. 11.776 11.776 ↑ 1.0 1 5,888

Index Scan using address_to_section_pkey on address_to_section address_to_section_8 (cost=0.42..8.44 rows=1 width=25) (actual time=0.002..0.002 rows=1 loops=5,888)

  • Index Cond: (id = groups_contacts_10.address_to_section_id)
229. 11.756 11.756 ↑ 1.0 1 5,878

Index Scan using address_pkey on address address_3 (cost=0.42..0.51 rows=1 width=20) (actual time=0.002..0.002 rows=1 loops=5,878)

  • Index Cond: (address_to_section_8.address_id = id)
230. 11.776 117.760 ↑ 1.0 1 5,888

Limit (cost=0.84..15.03 rows=1 width=1) (actual time=0.018..0.020 rows=1 loops=5,888)

231. 17.684 105.984 ↑ 2.0 1 5,888

Nested Loop Left Join (cost=0.84..29.21 rows=2 width=1) (actual time=0.018..0.018 rows=1 loops=5,888)

232. 11.776 76.544 ↑ 2.0 1 5,888

Nested Loop (cost=0.42..28.18 rows=2 width=4) (actual time=0.013..0.013 rows=1 loops=5,888)

233. 17.664 52.992 ↑ 2.0 1 5,888

Append (cost=0.00..11.31 rows=2 width=4) (actual time=0.009..0.009 rows=1 loops=5,888)

234. 0.000 0.000 ↓ 0.0 0 5,888

Seq Scan on groups_contacts groups_contacts_11 (cost=0.00..0.00 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=5,888)

  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text) AND (section_id = contractors.id))
235. 17.664 35.328 ↑ 1.0 1 5,888

Bitmap Heap Scan on groups_contacts__license groups_contacts__license_9 (cost=4.30..11.31 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=5,888)

  • Recheck Cond: (section_id = contractors.id)
  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=6467
236. 17.664 17.664 ↓ 1.5 3 5,888

Bitmap Index Scan on idx_groups_contacts__license_section_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.003..0.003 rows=3 loops=5,888)

  • Index Cond: (section_id = contractors.id)
237. 11.776 11.776 ↑ 1.0 1 5,888

Index Scan using address_to_section_pkey on address_to_section address_to_section_9 (cost=0.42..8.44 rows=1 width=25) (actual time=0.002..0.002 rows=1 loops=5,888)

  • Index Cond: (id = groups_contacts_11.address_to_section_id)
238. 11.756 11.756 ↑ 1.0 1 5,878

Index Scan using address_pkey on address address_4 (cost=0.42..0.51 rows=1 width=9) (actual time=0.002..0.002 rows=1 loops=5,878)

  • Index Cond: (address_to_section_9.address_id = id)
239. 11.776 117.760 ↑ 1.0 1 5,888

Limit (cost=0.84..15.03 rows=1 width=1) (actual time=0.018..0.020 rows=1 loops=5,888)

240. 17.684 105.984 ↑ 2.0 1 5,888

Nested Loop Left Join (cost=0.84..29.21 rows=2 width=1) (actual time=0.018..0.018 rows=1 loops=5,888)

241. 11.776 76.544 ↑ 2.0 1 5,888

Nested Loop (cost=0.42..28.18 rows=2 width=4) (actual time=0.013..0.013 rows=1 loops=5,888)

242. 17.664 52.992 ↑ 2.0 1 5,888

Append (cost=0.00..11.31 rows=2 width=4) (actual time=0.009..0.009 rows=1 loops=5,888)

243. 0.000 0.000 ↓ 0.0 0 5,888

Seq Scan on groups_contacts groups_contacts_12 (cost=0.00..0.00 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=5,888)

  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text) AND (section_id = contractors.id))
244. 17.664 35.328 ↑ 1.0 1 5,888

Bitmap Heap Scan on groups_contacts__license groups_contacts__license_10 (cost=4.30..11.31 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=5,888)

  • Recheck Cond: (section_id = contractors.id)
  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=6467
245. 17.664 17.664 ↓ 1.5 3 5,888

Bitmap Index Scan on idx_groups_contacts__license_section_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.003..0.003 rows=3 loops=5,888)

  • Index Cond: (section_id = contractors.id)
246. 11.776 11.776 ↑ 1.0 1 5,888

Index Scan using address_to_section_pkey on address_to_section address_to_section_10 (cost=0.42..8.44 rows=1 width=25) (actual time=0.002..0.002 rows=1 loops=5,888)

  • Index Cond: (id = groups_contacts_12.address_to_section_id)
247. 11.756 11.756 ↑ 1.0 1 5,878

Index Scan using address_pkey on address address_5 (cost=0.42..0.51 rows=1 width=9) (actual time=0.002..0.002 rows=1 loops=5,878)

  • Index Cond: (address_to_section_10.address_id = id)
248. 11.776 111.872 ↑ 1.0 1 5,888

Limit (cost=0.84..15.03 rows=1 width=8) (actual time=0.018..0.019 rows=1 loops=5,888)

249. 11.796 100.096 ↑ 2.0 1 5,888

Nested Loop Left Join (cost=0.84..29.21 rows=2 width=8) (actual time=0.017..0.017 rows=1 loops=5,888)

250. 11.776 76.544 ↑ 2.0 1 5,888

Nested Loop (cost=0.42..28.18 rows=2 width=4) (actual time=0.013..0.013 rows=1 loops=5,888)

251. 17.664 52.992 ↑ 2.0 1 5,888

Append (cost=0.00..11.31 rows=2 width=4) (actual time=0.009..0.009 rows=1 loops=5,888)

252. 0.000 0.000 ↓ 0.0 0 5,888

Seq Scan on groups_contacts groups_contacts_13 (cost=0.00..0.00 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=5,888)

  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text) AND (section_id = contractors.id))
253. 17.664 35.328 ↑ 1.0 1 5,888

Bitmap Heap Scan on groups_contacts__license groups_contacts__license_11 (cost=4.30..11.31 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=5,888)

  • Recheck Cond: (section_id = contractors.id)
  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=6467
254. 17.664 17.664 ↓ 1.5 3 5,888

Bitmap Index Scan on idx_groups_contacts__license_section_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.003..0.003 rows=3 loops=5,888)

  • Index Cond: (section_id = contractors.id)
255. 11.776 11.776 ↑ 1.0 1 5,888

Index Scan using address_to_section_pkey on address_to_section address_to_section_11 (cost=0.42..8.44 rows=1 width=25) (actual time=0.002..0.002 rows=1 loops=5,888)

  • Index Cond: (id = groups_contacts_13.address_to_section_id)
256. 11.756 11.756 ↑ 1.0 1 5,878

Index Scan using address_pkey on address address_6 (cost=0.42..0.51 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=5,878)

  • Index Cond: (address_to_section_11.address_id = id)
257. 11.776 117.760 ↑ 1.0 1 5,888

Limit (cost=0.84..15.03 rows=1 width=2) (actual time=0.019..0.020 rows=1 loops=5,888)

258. 17.684 105.984 ↑ 2.0 1 5,888

Nested Loop Left Join (cost=0.84..29.21 rows=2 width=2) (actual time=0.018..0.018 rows=1 loops=5,888)

259. 11.776 76.544 ↑ 2.0 1 5,888

Nested Loop (cost=0.42..28.18 rows=2 width=4) (actual time=0.013..0.013 rows=1 loops=5,888)

260. 17.664 52.992 ↑ 2.0 1 5,888

Append (cost=0.00..11.31 rows=2 width=4) (actual time=0.009..0.009 rows=1 loops=5,888)

261. 0.000 0.000 ↓ 0.0 0 5,888

Seq Scan on groups_contacts groups_contacts_14 (cost=0.00..0.00 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=5,888)

  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text) AND (section_id = contractors.id))
262. 17.664 35.328 ↑ 1.0 1 5,888

Bitmap Heap Scan on groups_contacts__license groups_contacts__license_12 (cost=4.30..11.31 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=5,888)

  • Recheck Cond: (section_id = contractors.id)
  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=6467
263. 17.664 17.664 ↓ 1.5 3 5,888

Bitmap Index Scan on idx_groups_contacts__license_section_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.003..0.003 rows=3 loops=5,888)

  • Index Cond: (section_id = contractors.id)
264. 11.776 11.776 ↑ 1.0 1 5,888

Index Scan using address_to_section_pkey on address_to_section address_to_section_12 (cost=0.42..8.44 rows=1 width=25) (actual time=0.002..0.002 rows=1 loops=5,888)

  • Index Cond: (id = groups_contacts_14.address_to_section_id)
265. 11.756 11.756 ↑ 1.0 1 5,878

Index Scan using address_pkey on address address_7 (cost=0.42..0.51 rows=1 width=10) (actual time=0.002..0.002 rows=1 loops=5,878)

  • Index Cond: (address_to_section_12.address_id = id)
266. 5.888 111.872 ↑ 1.0 1 5,888

Limit (cost=0.84..15.03 rows=1 width=7) (actual time=0.018..0.019 rows=1 loops=5,888)

267. 17.684 105.984 ↑ 2.0 1 5,888

Nested Loop Left Join (cost=0.84..29.21 rows=2 width=7) (actual time=0.017..0.018 rows=1 loops=5,888)

268. 5.888 76.544 ↑ 2.0 1 5,888

Nested Loop (cost=0.42..28.18 rows=2 width=4) (actual time=0.013..0.013 rows=1 loops=5,888)

269. 17.664 52.992 ↑ 2.0 1 5,888

Append (cost=0.00..11.31 rows=2 width=4) (actual time=0.009..0.009 rows=1 loops=5,888)

270. 0.000 0.000 ↓ 0.0 0 5,888

Seq Scan on groups_contacts groups_contacts_15 (cost=0.00..0.00 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=5,888)

  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text) AND (section_id = contractors.id))
271. 17.664 35.328 ↑ 1.0 1 5,888

Bitmap Heap Scan on groups_contacts__license groups_contacts__license_13 (cost=4.30..11.31 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=5,888)

  • Recheck Cond: (section_id = contractors.id)
  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=6467
272. 17.664 17.664 ↓ 1.5 3 5,888

Bitmap Index Scan on idx_groups_contacts__license_section_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.003..0.003 rows=3 loops=5,888)

  • Index Cond: (section_id = contractors.id)
273. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using address_to_section_pkey on address_to_section address_to_section_13 (cost=0.42..8.44 rows=1 width=25) (actual time=0.003..0.003 rows=1 loops=5,888)

  • Index Cond: (id = groups_contacts_15.address_to_section_id)
274. 11.756 11.756 ↑ 1.0 1 5,878

Index Scan using address_pkey on address address_8 (cost=0.42..0.51 rows=1 width=15) (actual time=0.002..0.002 rows=1 loops=5,878)

  • Index Cond: (address_to_section_13.address_id = id)
275. 11.776 117.760 ↑ 1.0 1 5,888

Limit (cost=0.84..15.03 rows=1 width=4) (actual time=0.018..0.020 rows=1 loops=5,888)

276. 17.684 105.984 ↑ 2.0 1 5,888

Nested Loop Left Join (cost=0.84..29.21 rows=2 width=4) (actual time=0.018..0.018 rows=1 loops=5,888)

277. 11.776 76.544 ↑ 2.0 1 5,888

Nested Loop (cost=0.42..28.18 rows=2 width=4) (actual time=0.013..0.013 rows=1 loops=5,888)

278. 17.664 52.992 ↑ 2.0 1 5,888

Append (cost=0.00..11.31 rows=2 width=4) (actual time=0.009..0.009 rows=1 loops=5,888)

279. 0.000 0.000 ↓ 0.0 0 5,888

Seq Scan on groups_contacts groups_contacts_16 (cost=0.00..0.00 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=5,888)

  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text) AND (section_id = contractors.id))
280. 17.664 35.328 ↑ 1.0 1 5,888

Bitmap Heap Scan on groups_contacts__license groups_contacts__license_14 (cost=4.30..11.31 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=5,888)

  • Recheck Cond: (section_id = contractors.id)
  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=6467
281. 17.664 17.664 ↓ 1.5 3 5,888

Bitmap Index Scan on idx_groups_contacts__license_section_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.003..0.003 rows=3 loops=5,888)

  • Index Cond: (section_id = contractors.id)
282. 11.776 11.776 ↑ 1.0 1 5,888

Index Scan using address_to_section_pkey on address_to_section address_to_section_14 (cost=0.42..8.44 rows=1 width=25) (actual time=0.002..0.002 rows=1 loops=5,888)

  • Index Cond: (id = groups_contacts_16.address_to_section_id)
283. 11.756 11.756 ↑ 1.0 1 5,878

Index Scan using address_pkey on address address_9 (cost=0.42..0.51 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=5,878)

  • Index Cond: (address_to_section_14.address_id = id)
284. 11.776 94.208 ↑ 1.0 1 5,888

Limit (cost=0.42..14.30 rows=1 width=4) (actual time=0.015..0.016 rows=1 loops=5,888)

285. 11.776 82.432 ↑ 2.0 1 5,888

Nested Loop (cost=0.42..28.18 rows=2 width=4) (actual time=0.014..0.014 rows=1 loops=5,888)

286. 17.664 52.992 ↑ 2.0 1 5,888

Append (cost=0.00..11.31 rows=2 width=4) (actual time=0.009..0.009 rows=1 loops=5,888)

287. 0.000 0.000 ↓ 0.0 0 5,888

Seq Scan on groups_contacts groups_contacts_17 (cost=0.00..0.00 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=5,888)

  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text) AND (section_id = contractors.id))
288. 17.664 35.328 ↑ 1.0 1 5,888

Bitmap Heap Scan on groups_contacts__license groups_contacts__license_15 (cost=4.30..11.31 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=5,888)

  • Recheck Cond: (section_id = contractors.id)
  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=6467
289. 17.664 17.664 ↓ 1.5 3 5,888

Bitmap Index Scan on idx_groups_contacts__license_section_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.003..0.003 rows=3 loops=5,888)

  • Index Cond: (section_id = contractors.id)
290. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using address_to_section_pkey on address_to_section address_to_section_15 (cost=0.42..8.44 rows=1 width=25) (actual time=0.002..0.003 rows=1 loops=5,888)

  • Index Cond: (id = groups_contacts_17.address_to_section_id)
291. 11.776 88.320 ↑ 1.0 1 5,888

Limit (cost=0.42..14.30 rows=1 width=7) (actual time=0.014..0.015 rows=1 loops=5,888)

292. 5.888 76.544 ↑ 2.0 1 5,888

Nested Loop (cost=0.42..28.18 rows=2 width=7) (actual time=0.013..0.013 rows=1 loops=5,888)

293. 17.664 52.992 ↑ 2.0 1 5,888

Append (cost=0.00..11.31 rows=2 width=4) (actual time=0.009..0.009 rows=1 loops=5,888)

294. 0.000 0.000 ↓ 0.0 0 5,888

Seq Scan on groups_contacts groups_contacts_18 (cost=0.00..0.00 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=5,888)

  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text) AND (section_id = contractors.id))
295. 17.664 35.328 ↑ 1.0 1 5,888

Bitmap Heap Scan on groups_contacts__license groups_contacts__license_16 (cost=4.30..11.31 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=5,888)

  • Recheck Cond: (section_id = contractors.id)
  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=6467
296. 17.664 17.664 ↓ 1.5 3 5,888

Bitmap Index Scan on idx_groups_contacts__license_section_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.003..0.003 rows=3 loops=5,888)

  • Index Cond: (section_id = contractors.id)
297. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using address_to_section_pkey on address_to_section address_to_section_16 (cost=0.42..8.44 rows=1 width=32) (actual time=0.002..0.003 rows=1 loops=5,888)

  • Index Cond: (id = groups_contacts_18.address_to_section_id)
298. 5.888 88.320 ↑ 1.0 1 5,888

Limit (cost=0.42..14.30 rows=1 width=9) (actual time=0.014..0.015 rows=1 loops=5,888)

299. 17.664 82.432 ↑ 2.0 1 5,888

Nested Loop (cost=0.42..28.18 rows=2 width=9) (actual time=0.014..0.014 rows=1 loops=5,888)

300. 17.664 52.992 ↑ 2.0 1 5,888

Append (cost=0.00..11.31 rows=2 width=4) (actual time=0.009..0.009 rows=1 loops=5,888)

301. 0.000 0.000 ↓ 0.0 0 5,888

Seq Scan on groups_contacts groups_contacts_19 (cost=0.00..0.00 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=5,888)

  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text) AND (section_id = contractors.id))
302. 17.664 35.328 ↑ 1.0 1 5,888

Bitmap Heap Scan on groups_contacts__license groups_contacts__license_17 (cost=4.30..11.31 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=5,888)

  • Recheck Cond: (section_id = contractors.id)
  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=6467
303. 17.664 17.664 ↓ 1.5 3 5,888

Bitmap Index Scan on idx_groups_contacts__license_section_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.003..0.003 rows=3 loops=5,888)

  • Index Cond: (section_id = contractors.id)
304. 11.776 11.776 ↑ 1.0 1 5,888

Index Scan using address_to_section_pkey on address_to_section address_to_section_17 (cost=0.42..8.44 rows=1 width=25) (actual time=0.002..0.002 rows=1 loops=5,888)

  • Index Cond: (id = groups_contacts_19.address_to_section_id)
305. 17.664 182.528 ↑ 1.0 1 5,888

Limit (cost=1.26..15.82 rows=1 width=32) (actual time=0.029..0.031 rows=1 loops=5,888)

306. 29.470 164.864 ↑ 2.0 1 5,888

Nested Loop Left Join (cost=1.26..30.39 rows=2 width=32) (actual time=0.028..0.028 rows=1 loops=5,888)

307. 17.694 117.760 ↑ 2.0 1 5,888

Nested Loop Left Join (cost=0.84..29.26 rows=2 width=30) (actual time=0.020..0.020 rows=1 loops=5,888)

  • Join Filter: ((address_to_section_18.section)::text = 'contacts'::text)
308. 11.776 82.432 ↑ 2.0 1 5,888

Nested Loop (cost=0.42..28.18 rows=2 width=17) (actual time=0.014..0.014 rows=1 loops=5,888)

309. 17.664 52.992 ↑ 2.0 1 5,888

Append (cost=0.00..11.31 rows=2 width=4) (actual time=0.009..0.009 rows=1 loops=5,888)

310. 0.000 0.000 ↓ 0.0 0 5,888

Seq Scan on groups_contacts groups_contacts_20 (cost=0.00..0.00 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=5,888)

  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text) AND (section_id = contractors.id))
311. 17.664 35.328 ↑ 1.0 1 5,888

Bitmap Heap Scan on groups_contacts__license groups_contacts__license_18 (cost=4.30..11.31 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=5,888)

  • Recheck Cond: (section_id = contractors.id)
  • Filter: (active AND primary_contact AND ((permit_contractor_id = 0) OR (permit_contractor_id IS NULL)) AND (class_id <> 2) AND ((section)::text = 'license'::text))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=6467
312. 17.664 17.664 ↓ 1.5 3 5,888

Bitmap Index Scan on idx_groups_contacts__license_section_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.003..0.003 rows=3 loops=5,888)

  • Index Cond: (section_id = contractors.id)
313. 17.664 17.664 ↑ 1.0 1 5,888

Index Scan using address_to_section_pkey on address_to_section address_to_section_18 (cost=0.42..8.44 rows=1 width=25) (actual time=0.003..0.003 rows=1 loops=5,888)

  • Index Cond: (id = groups_contacts_20.address_to_section_id)
314. 17.634 17.634 ↑ 1.0 1 5,878

Index Scan using _contacts_pkey on _contacts _contacts_19 (cost=0.42..0.52 rows=1 width=34) (actual time=0.003..0.003 rows=1 loops=5,878)

  • Index Cond: (address_to_section_18.section_id = id)
315. 17.634 17.634 ↑ 1.0 1 5,878

Index Scan using address_pkey on address address_10 (cost=0.42..0.51 rows=1 width=45) (actual time=0.003..0.003 rows=1 loops=5,878)

  • Index Cond: (address_to_section_18.address_id = id)
316. 0.000 88.320 ↓ 0.0 0 5,888

Limit (cost=0.42..11.64 rows=1 width=19) (actual time=0.015..0.015 rows=0 loops=5,888)

317. 13.296 88.320 ↓ 0.0 0 5,888

Nested Loop (cost=0.42..11.64 rows=1 width=19) (actual time=0.015..0.015 rows=0 loops=5,888)

318. 70.656 70.656 ↓ 0.0 0 5,888

Seq Scan on _users u (cost=0.00..3.20 rows=1 width=4) (actual time=0.012..0.012 rows=0 loops=5,888)

  • Filter: (id = contractors.processed_by)
  • Rows Removed by Filter: 94
319. 4.368 4.368 ↑ 1.0 1 728

Index Scan using _contacts_pkey on _contacts con (cost=0.42..8.44 rows=1 width=27) (actual time=0.006..0.006 rows=1 loops=728)

  • Index Cond: (id = u.contact_id)
320. 5.888 58.880 ↓ 0.0 0 5,888

Limit (cost=0.42..11.64 rows=1 width=19) (actual time=0.010..0.010 rows=0 loops=5,888)

321. 5.798 52.992 ↓ 0.0 0 5,888

Nested Loop (cost=0.42..11.64 rows=1 width=19) (actual time=0.009..0.009 rows=0 loops=5,888)

322. 47.104 47.104 ↓ 0.0 0 5,888

Seq Scan on _users u_1 (cost=0.00..3.20 rows=1 width=4) (actual time=0.008..0.008 rows=0 loops=5,888)

  • Filter: (id = contractors.issued_by)
  • Rows Removed by Filter: 96
323. 0.090 0.090 ↑ 1.0 1 18

Index Scan using _contacts_pkey on _contacts con_1 (cost=0.42..8.44 rows=1 width=27) (actual time=0.005..0.005 rows=1 loops=18)

  • Index Cond: (id = u_1.contact_id)
324. 5.888 64.768 ↓ 0.0 0 5,888

Limit (cost=0.29..0.43 rows=1 width=40) (actual time=0.011..0.011 rows=0 loops=5,888)

325. 5.888 58.880 ↓ 0.0 0 5,888

Nested Loop (cost=0.29..12.35 rows=83 width=40) (actual time=0.010..0.010 rows=0 loops=5,888)

  • Join Filter: ((nhs.type)::text = (cnt.name)::text)
326. 52.992 52.992 ↓ 0.0 0 5,888

Index Scan Backward using idx_notification_history_section_section_timestamp on notification_history nhs (cost=0.29..8.31 rows=1 width=24) (actual time=0.009..0.009 rows=0 loops=5,888)

  • Index Cond: (((section)::text = 'license'::text) AND (section_id = contractors.id))
327. 0.000 0.000 ↓ 0.0 0

Seq Scan on notification_types cnt (cost=0.00..2.91 rows=91 width=48) (never executed)

  • Filter: dg_display
328. 5.888 29.440 ↓ 0.0 0 5,888

Limit (cost=0.29..0.44 rows=1 width=40) (actual time=0.005..0.005 rows=0 loops=5,888)

329. 5.888 23.552 ↓ 0.0 0 5,888

Nested Loop (cost=0.29..12.56 rows=83 width=40) (actual time=0.004..0.004 rows=0 loops=5,888)

  • Join Filter: ((nhs_1.type)::text = (cnt_1.name)::text)
330. 17.664 17.664 ↓ 0.0 0 5,888

Index Scan Backward using idx_notification_history_section_section_timestamp on notification_history nhs_1 (cost=0.29..8.31 rows=1 width=24) (actual time=0.003..0.003 rows=0 loops=5,888)

  • Index Cond: (((section)::text = 'license'::text) AND (section_id = contractors.id))
331. 0.000 0.000 ↓ 0.0 0

Seq Scan on notification_types cnt_1 (cost=0.00..2.91 rows=91 width=16) (never executed)

  • Filter: dg_display
332. 0.000 23.552 ↓ 0.0 0 5,888

Limit (cost=0.29..0.43 rows=1 width=41) (actual time=0.004..0.004 rows=0 loops=5,888)

333. 5.888 23.552 ↓ 0.0 0 5,888

Nested Loop (cost=0.29..12.35 rows=83 width=41) (actual time=0.004..0.004 rows=0 loops=5,888)

  • Join Filter: ((nhs_2.type)::text = (cnt_2.name)::text)
334. 17.664 17.664 ↓ 0.0 0 5,888

Index Scan Backward using idx_notification_history_section_section_timestamp on notification_history nhs_2 (cost=0.29..8.31 rows=1 width=57) (actual time=0.003..0.003 rows=0 loops=5,888)

  • Index Cond: (((section)::text = 'license'::text) AND (section_id = contractors.id))
335. 0.000 0.000 ↓ 0.0 0

Seq Scan on notification_types cnt_2 (cost=0.00..2.91 rows=91 width=16) (never executed)

  • Filter: dg_display
Planning time : 42.719 ms
Execution time : 173,027.629 ms