explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TJ8P

Settings

Optimization(s) for this plan:

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

Unique (cost=27700.83..27700.89 rows=1 width=2770) (actual time=2175788.443..2175788.444 rows=1 loops=1)-> Sort (cost=27700.83..27700.83 rows=1 width=2770) (actual time=2175788.442..2175788.442 rows=1 loops=1)Sort Key: "PC0".providerid, "PC0".salutation, "PC0".providerstatus, "PC0".providertype, "PC0".graduationyear, "PC0".graduationschool, "PC0".doctorname, "PC0".providerspecialty, "PC0".degree, "PC0".birthdate, "PC0".accountid, "PC0".providerrole, "PC0".suffix, "PC0".middlename, "PC0".lastname, "PC0".firstname, "Practice".practicename, "Practice".practiceid, "Practice".street1, "Practice".street2, "Practice".pycity, "Practice".pystate, "Practice".pycountry, "Practice".zip, "BillingAccounts".billingaccountidSort Method: quicksort Memory: 25kB-> Nested Loop (cost=13648.85..27700.82 rows=1 width=2770) (actual time=2175363.757..2175788.416 rows=1 loops=1)-> Gather (cost=13648.43..27700.37 rows=1 width=2708) (actual time=2175363.730..2175793.324 rows=1 loops=1)Workers Planned: 2Workers Launched: 2-> Nested Loop (cost=12648.43..26700.27 rows=1 width=2708) (actual time=2054054.953..2175169.000 rows=0 loops=3)Join Filter: ((("PhoneNum".pyphonenumber)::text = '5616595333'::text) OR (upper(("PC0".lastname)::text) = 'Bentley'::text) OR ((("PC0".providerid)::text = '512'::text) AND (("BillingAccounts".billingaccountid)::text = '10-1531039'::text)))Rows Removed by Join Filter: 198446-> Nested Loop Left Join (cost=12648.00..26699.79 rows=1 width=44) (actual time=206.719..2171504.400 rows=198446 loops=3)-> Nested Loop (cost=12647.58..22535.52 rows=1 width=34) (actual time=198.057..3079.694 rows=111766 loops=3)-> Parallel Hash Join (cost=12647.16..22535.07 rows=1 width=44) (actual time=198.003..1204.117 rows=111766 loops=3)Hash Cond: ((("PracticeRef".practiceid)::text = ("PracticeAccount".practiceid)::text) AND (("BillingRef".billingaccountid)::text = ("PracticeAccount".billingaccountid)::text))-> Parallel Hash Join (cost=6878.81..15793.51 rows=185375 width=28) (actual time=117.470..718.541 rows=173782 loops=3)Hash Cond: (("PracticeRef".providerid)::text = ("BillingRef".providerid)::text)-> Parallel Seq Scan on gcx_practicexprovides "PracticeRef" (cost=0.00..6817.82 rows=268382 width=12) (actual time=0.005..124.371 rows=214765 loops=3)-> Parallel Hash (cost=4411.14..4411.14 rows=197414 width=16) (actual time=116.664..116.664 rows=111868 loops=3)Buckets: 524288 Batches: 1 Memory Usage: 22144kB-> Parallel Seq Scan on gcx_providerxaccounts "BillingRef" (cost=0.00..4411.14 rows=197414 width=16) (actual time=0.006..49.325 rows=111868 loops=3)-> Parallel Hash (cost=3454.54..3454.54 rows=154254 width=16) (actual time=79.162..79.163 rows=87439 loops=3)Buckets: 524288 Batches: 1 Memory Usage: 18240kB-> Parallel Seq Scan on gcx_practicexaccounts "PracticeAccount" (cost=0.00..3454.54 rows=154254 width=16)(actual time=0.007..32.600 rows=87439 loops=3)-> Index Only Scan using gcx_billingaccount_pk on gcx_billingaccount "BillingAccounts" (cost=0.42..0.44 rows=1 width=10) (actual rows= loops=)