explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3pP5

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Sort (cost=9,967.17..9,969.67 rows=1,000 width=233) (actual rows= loops=)

  • Sort Key: (count(*)) DESC
2. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,286.53..9,917.34 rows=1,000 width=233) (actual rows= loops=)

  • Hash Cond: ((nr.taxonomy)::text = (t.code)::text)
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,254.13..9,866.20 rows=1,000 width=121) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

HashAggregate (cost=1,253.70..1,496.20 rows=1,000 width=40) (actual rows= loops=)

  • Group Key: unnest(ARRAY[CASE WHEN ((n.npi_type)::text = '1'::text) THEN sl.provider_billing_npi ELSE NULL::character varying END, CASE WHEN ((CASE WHEN ((n1.npi_type)::text = '1'::text) THEN sl.provider_rendering_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n.npi_type)::text = '1'::text) THEN sl.provider_billing_npi ELSE NULL::character varying END)::text) THEN CASE WHEN ((n1.npi_type)::text = '1'::text) THEN sl.provider_rendering_npi ELSE NULL::character varying END ELSE NULL::character varying END, CASE WHEN (((CASE WHEN ((n2.npi_type)::text = '1'::text) THEN sl.provider_referring_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n.npi_type)::text = '1'::text) THEN sl.provider_billing_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n2.npi_type)::text = '1'::text) THEN sl.provider_referring_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n1.npi_type)::text = '1'::text) THEN sl.provider_rendering_npi ELSE NULL::character varying END)::text)) THEN CASE WHEN ((n2.npi_type)::text = '1'::text) THEN sl.provider_referring_npi ELSE NULL::character varying END ELSE NULL::character varying END, CASE WHEN (((CASE WHEN ((n3.npi_type)::text = '1'::text) THEN sl.provider_facility_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n.npi_type)::text = '1'::text) THEN sl.provider_billing_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n3.npi_type)::text = '1'::text) THEN sl.provider_facility_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n1.npi_type)::text = '1'::text) THEN sl.provider_rendering_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n3.npi_type)::text = '1'::text) THEN sl.provider_facility_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n2.npi_type)::text = '1'::text) THEN sl.provider_referring_npi ELSE NULL::character varying END)::text)) THEN CASE WHEN ((n3.npi_type)::text = '1'::text) THEN sl.provider_facility_npi ELSE NULL::character varying END ELSE NULL::character varying END, CASE WHEN (((CASE WHEN ((n5.npi_type)::text = '1'::text) THEN sl.provider_purch_svc_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n.npi_type)::text = '1'::text) THEN sl.provider_billing_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n5.npi_type)::text = '1'::text) THEN sl.provider_purch_svc_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n1.npi_type)::text = '1'::text) THEN sl.provider_rendering_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n5.npi_type)::text = '1'::text) THEN sl.provider_purch_svc_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n2.npi_type)::text = '1'::text) THEN sl.provider_referring_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n5.npi_type)::text = '1'::text) THEN sl.provider_purch_svc_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n3.npi_type)::text = '1'::text) THEN sl.provider_facility_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n5.npi_type)::text = '1'::text) THEN sl.provider_purch_svc_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n7.npi_type)::text = '1'::text) THEN sl.provider_pay_to_npi ELSE NULL::character varying END)::text)) THEN CASE WHEN ((n5.npi_type)::text = '1'::text) THEN sl.provider_purch_svc_npi ELSE NULL::character varying END ELSE NULL::character varying END, CASE WHEN (((CASE WHEN ((n6.npi_type)::text = '1'::text) THEN sl.provider_supervising_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n.npi_type)::text = '1'::text) THEN sl.provider_billing_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n6.npi_type)::text = '1'::text) THEN sl.provider_supervising_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n1.npi_type)::text = '1'::text) THEN sl.provider_rendering_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n6.npi_type)::text = '1'::text) THEN sl.provider_supervising_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n2.npi_type)::text = '1'::text) THEN sl.provider_referring_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n6.npi_type)::text = '1'::text) THEN sl.provider_supervising_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n3.npi_type)::text = '1'::text) THEN sl.provider_facility_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n6.npi_type)::text = '1'::text) THEN sl.provider_supervising_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n7.npi_type)::text = '1'::text) THEN sl.provider_pay_to_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n6.npi_type)::text = '1'::text) THEN sl.provider_supervising_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n5.npi_type)::text = '1'::text) THEN sl.provider_purch_svc_npi ELSE NULL::character varying END)::text)) THEN CASE WHEN ((n6.npi_type)::text = '1'::text) THEN sl.provider_supervising_npi ELSE NULL::character varying END ELSE NULL::character varying END, CASE WHEN (((CASE WHEN ((n7.npi_type)::text = '1'::text) THEN sl.provider_pay_to_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n.npi_type)::text = '1'::text) THEN sl.provider_billing_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n7.npi_type)::text = '1'::text) THEN sl.provider_pay_to_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n1.npi_type)::text = '1'::text) THEN sl.provider_rendering_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n7.npi_type)::text = '1'::text) THEN sl.provider_pay_to_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n2.npi_type)::text = '1'::text) THEN sl.provider_referring_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n7.npi_type)::text = '1'::text) THEN sl.provider_pay_to_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n3.npi_type)::text = '1'::text) THEN sl.provider_facility_npi ELSE NULL::character varying END)::text)) THEN CASE WHEN ((n7.npi_type)::text = '1'::text) THEN sl.provider_pay_to_npi ELSE NULL::character varying END ELSE NULL::character varying END, CASE WHEN (((CASE WHEN ((n4.npi_type)::text = '1'::text) THEN sl.provider_ordering_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n.npi_type)::text = '1'::text) THEN sl.provider_billing_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n4.npi_type)::text = '1'::text) THEN sl.provider_ordering_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n1.npi_type)::text = '1'::text) THEN sl.provider_rendering_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n4.npi_type)::text = '1'::text) THEN sl.provider_ordering_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n2.npi_type)::text = '1'::text) THEN sl.provider_referring_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n4.npi_type)::text = '1'::text) THEN sl.provider_ordering_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n3.npi_type)::text = '1'::text) THEN sl.provider_facility_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n4.npi_type)::text = '1'::text) THEN sl.provider_ordering_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n7.npi_type)::text = '1'::text) THEN sl.provider_pay_to_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n4.npi_type)::text = '1'::text) THEN sl.provider_ordering_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n5.npi_type)::text = '1'::text) THEN sl.provider_purch_svc_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n4.npi_type)::text = '1'::text) THEN sl.provider_ordering_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n6.npi_type)::text = '1'::text) THEN sl.provider_supervising_npi ELSE NULL::character varying END)::text)) THEN CASE WHEN ((n4.npi_type)::text = '1'::text) THEN sl.provider_ordering_npi ELSE NULL::character varying END ELSE NULL::character varying END])
5. 0.000 0.000 ↓ 0.0

ProjectSet (cost=60.57..1,248.70 rows=1,000 width=32) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=60.57..1,241.32 rows=10 width=35) (actual rows= loops=)

  • Filter: (((n.npi_type)::text = '1'::text) OR ((n1.npi_type)::text = '1'::text) OR ((n2.npi_type)::text = '1'::text) OR ((n3.npi_type)::text = '1'::text) OR ((n4.npi_type)::text = '1'::text) OR ((n5.npi_type)::text = '1'::text) OR ((n6.npi_type)::text = '1'::text) OR ((n7.npi_type)::text = '1'::text))
7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=60.14..1,156.52 rows=10 width=34) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=59.71..1,071.92 rows=10 width=33) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=59.27..987.32 rows=10 width=32) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=58.84..902.72 rows=10 width=31) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=58.41..818.12 rows=10 width=30) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=57.98..733.52 rows=10 width=29) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=57.55..648.92 rows=10 width=28) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Limit (cost=57.11..564.22 rows=10 width=27) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Hash Join (cost=57.11..76,251,909.11 rows=1,503,652 width=27) (actual rows= loops=)

  • Hash Cond: ((sl.dx_cd)::text = (bac.hcpccode)::text)
16. 0.000 0.000 ↓ 0.0

Seq Scan on service_lines2018 sl (cost=0.00..65,550,082.20 rows=610,670,473 width=32) (actual rows= loops=)

  • Filter: ((dx_code_position)::text = '1'::text)
17. 0.000 0.000 ↓ 0.0

Hash (cost=56.95..56.95 rows=13 width=6) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Seq Scan on bucketsandcodes bac (cost=0.00..56.95 rows=13 width=6) (actual rows= loops=)

  • Filter: ((bucketname)::text = (bucketname)::text)
19. 0.000 0.000 ↓ 0.0

Index Scan using npi_entities_npi_idx on npi_entities n (cost=0.43..8.45 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((sl.provider_billing_npi)::text = (npi)::text)
20. 0.000 0.000 ↓ 0.0

Index Scan using npi_entities_npi_idx on npi_entities n1 (cost=0.43..8.45 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((sl.provider_rendering_npi)::text = (npi)::text)
21. 0.000 0.000 ↓ 0.0

Index Scan using npi_entities_npi_idx on npi_entities n2 (cost=0.43..8.45 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((sl.provider_referring_npi)::text = (npi)::text)
22. 0.000 0.000 ↓ 0.0

Index Scan using npi_entities_npi_idx on npi_entities n3 (cost=0.43..8.45 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((sl.provider_facility_npi)::text = (npi)::text)
23. 0.000 0.000 ↓ 0.0

Index Scan using npi_entities_npi_idx on npi_entities n4 (cost=0.43..8.45 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((sl.provider_ordering_npi)::text = (npi)::text)
24. 0.000 0.000 ↓ 0.0

Index Scan using npi_entities_npi_idx on npi_entities n5 (cost=0.43..8.45 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((sl.provider_purch_svc_npi)::text = (npi)::text)
25. 0.000 0.000 ↓ 0.0

Index Scan using npi_entities_npi_idx on npi_entities n6 (cost=0.43..8.45 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((sl.provider_supervising_npi)::text = (npi)::text)
26. 0.000 0.000 ↓ 0.0

Index Scan using npi_entities_npi_idx on npi_entities n7 (cost=0.43..8.45 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((sl.provider_pay_to_npi)::text = (npi)::text)
27. 0.000 0.000 ↓ 0.0

Index Scan using npi_registry_npi_idx on npi_registry nr (cost=0.43..8.35 rows=1 width=92) (actual rows= loops=)

  • Index Cond: ((npi)::text = ((unnest(ARRAY[CASE WHEN ((n.npi_type)::text = '1'::text) THEN sl.provider_billing_npi ELSE NULL::character varying END, CASE WHEN ((CASE WHEN ((n1.npi_type)::text = '1'::text) THEN sl.provider_rendering_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n.npi_type)::text = '1'::text) THEN sl.provider_billing_npi ELSE NULL::character varying END)::text) THEN CASE WHEN ((n1.npi_type)::text = '1'::text) THEN sl.provider_rendering_npi ELSE NULL::character varying END ELSE NULL::character varying END, CASE WHEN (((CASE WHEN ((n2.npi_type)::text = '1'::text) THEN sl.provider_referring_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n.npi_type)::text = '1'::text) THEN sl.provider_billing_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n2.npi_type)::text = '1'::text) THEN sl.provider_referring_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n1.npi_type)::text = '1'::text) THEN sl.provider_rendering_npi ELSE NULL::character varying END)::text)) THEN CASE WHEN ((n2.npi_type)::text = '1'::text) THEN sl.provider_referring_npi ELSE NULL::character varying END ELSE NULL::character varying END, CASE WHEN (((CASE WHEN ((n3.npi_type)::text = '1'::text) THEN sl.provider_facility_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n.npi_type)::text = '1'::text) THEN sl.provider_billing_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n3.npi_type)::text = '1'::text) THEN sl.provider_facility_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n1.npi_type)::text = '1'::text) THEN sl.provider_rendering_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n3.npi_type)::text = '1'::text) THEN sl.provider_facility_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n2.npi_type)::text = '1'::text) THEN sl.provider_referring_npi ELSE NULL::character varying END)::text)) THEN CASE WHEN ((n3.npi_type)::text = '1'::text) THEN sl.provider_facility_npi ELSE NULL::character varying END ELSE NULL::character varying END, CASE WHEN (((CASE WHEN ((n5.npi_type)::text = '1'::text) THEN sl.provider_purch_svc_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n.npi_type)::text = '1'::text) THEN sl.provider_billing_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n5.npi_type)::text = '1'::text) THEN sl.provider_purch_svc_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n1.npi_type)::text = '1'::text) THEN sl.provider_rendering_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n5.npi_type)::text = '1'::text) THEN sl.provider_purch_svc_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n2.npi_type)::text = '1'::text) THEN sl.provider_referring_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n5.npi_type)::text = '1'::text) THEN sl.provider_purch_svc_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n3.npi_type)::text = '1'::text) THEN sl.provider_facility_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n5.npi_type)::text = '1'::text) THEN sl.provider_purch_svc_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n7.npi_type)::text = '1'::text) THEN sl.provider_pay_to_npi ELSE NULL::character varying END)::text)) THEN CASE WHEN ((n5.npi_type)::text = '1'::text) THEN sl.provider_purch_svc_npi ELSE NULL::character varying END ELSE NULL::character varying END, CASE WHEN (((CASE WHEN ((n6.npi_type)::text = '1'::text) THEN sl.provider_supervising_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n.npi_type)::text = '1'::text) THEN sl.provider_billing_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n6.npi_type)::text = '1'::text) THEN sl.provider_supervising_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n1.npi_type)::text = '1'::text) THEN sl.provider_rendering_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n6.npi_type)::text = '1'::text) THEN sl.provider_supervising_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n2.npi_type)::text = '1'::text) THEN sl.provider_referring_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n6.npi_type)::text = '1'::text) THEN sl.provider_supervising_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n3.npi_type)::text = '1'::text) THEN sl.provider_facility_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n6.npi_type)::text = '1'::text) THEN sl.provider_supervising_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n7.npi_type)::text = '1'::text) THEN sl.provider_pay_to_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n6.npi_type)::text = '1'::text) THEN sl.provider_supervising_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n5.npi_type)::text = '1'::text) THEN sl.provider_purch_svc_npi ELSE NULL::character varying END)::text)) THEN CASE WHEN ((n6.npi_type)::text = '1'::text) THEN sl.provider_supervising_npi ELSE NULL::character varying END ELSE NULL::character varying END, CASE WHEN (((CASE WHEN ((n7.npi_type)::text = '1'::text) THEN sl.provider_pay_to_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n.npi_type)::text = '1'::text) THEN sl.provider_billing_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n7.npi_type)::text = '1'::text) THEN sl.provider_pay_to_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n1.npi_type)::text = '1'::text) THEN sl.provider_rendering_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n7.npi_type)::text = '1'::text) THEN sl.provider_pay_to_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n2.npi_type)::text = '1'::text) THEN sl.provider_referring_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n7.npi_type)::text = '1'::text) THEN sl.provider_pay_to_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n3.npi_type)::text = '1'::text) THEN sl.provider_facility_npi ELSE NULL::character varying END)::text)) THEN CASE WHEN ((n7.npi_type)::text = '1'::text) THEN sl.provider_pay_to_npi ELSE NULL::character varying END ELSE NULL::character varying END, CASE WHEN (((CASE WHEN ((n4.npi_type)::text = '1'::text) THEN sl.provider_ordering_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n.npi_type)::text = '1'::text) THEN sl.provider_billing_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n4.npi_type)::text = '1'::text) THEN sl.provider_ordering_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n1.npi_type)::text = '1'::text) THEN sl.provider_rendering_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n4.npi_type)::text = '1'::text) THEN sl.provider_ordering_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n2.npi_type)::text = '1'::text) THEN sl.provider_referring_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n4.npi_type)::text = '1'::text) THEN sl.provider_ordering_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n3.npi_type)::text = '1'::text) THEN sl.provider_facility_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n4.npi_type)::text = '1'::text) THEN sl.provider_ordering_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n7.npi_type)::text = '1'::text) THEN sl.provider_pay_to_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n4.npi_type)::text = '1'::text) THEN sl.provider_ordering_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n5.npi_type)::text = '1'::text) THEN sl.provider_purch_svc_npi ELSE NULL::character varying END)::text) AND ((CASE WHEN ((n4.npi_type)::text = '1'::text) THEN sl.provider_ordering_npi ELSE NULL::character varying END)::text IS DISTINCT FROM (CASE WHEN ((n6.npi_type)::text = '1'::text) THEN sl.provider_supervising_npi ELSE NULL::character varying END)::text)) THEN CASE WHEN ((n4.npi_type)::text = '1'::text) THEN sl.provider_ordering_npi ELSE NULL::character varying END ELSE NULL::character varying END])))::text)
28. 0.000 0.000 ↓ 0.0

Hash (cost=21.62..21.62 rows=862 width=46) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Seq Scan on taxonomy t (cost=0.00..21.62 rows=862 width=46) (actual rows= loops=)