explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sZ8W : Optimization for: Optimization for: plan #RRy9; plan #PLZi

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.009 471.353 ↑ 1.0 1 1

Aggregate (cost=61,212.70..61,212.71 rows=1 width=48) (actual time=471.352..471.353 rows=1 loops=1)

2. 49.903 471.344 ↓ 0.0 0 1

Hash Full Join (cost=27,230.99..61,212.57 rows=3 width=24) (actual time=471.344..471.344 rows=0 loops=1)

  • Hash Cond: ((personstatus_1.personid)::text = (personstatus.personid)::text)
  • Filter: (((NOT personstatus_1.isdeleted) OR (personstatus_1.isdeleted IS NULL)) AND ((NOT personstatus.isdeleted) OR (personstatus.isdeleted IS NULL)) AND ((personstatus.embarkdate < '2019-11-25'::date) OR (personstatus_1.embarkdate < '2019-11-25'::date)) AND ((personstatus.debarkdate > '2019-11-21'::date) OR (personstatus_1.debarkdate > '2019-11-21'::date)) AND (((personstatus.shipcode)::text = 'DX'::text) OR ((personstatus_1.shipcode)::text = 'DX'::text)) AND (((personstatus.personid)::text = ANY ('{d22ddfa3-94a5-4fb1-ae59-49f340bbd0ff,0392a6b3-f89b-4b2d-b2e7-4315f24f1146,01e5b1f0-faae-42d8-8e11-dc517d48caad,7f9b2fbe-1378-4a5f-b0fe-bd5895ac04f1,6c86dfdb-e1e2-47ec-ae7e-cdb7844b880b,8215761a-8fb6-47fd-9ec0-e2226947aa9d,06b93acc-81d4-43db-9d6d-bec10daee09d,51ffc8aa-0cb4-4288-b975-90a8ddeaea45,87b209bb-784b-4960-ab1f-4b8584e2cd37,9024336c-9f5c-4f8f-89dd-0d16c09791ca}'::text[])) OR ((personstatus_1.personid)::text = ANY ('{d22ddfa3-94a5-4fb1-ae59-49f340bbd0ff,0392a6b3-f89b-4b2d-b2e7-4315f24f1146,01e5b1f0-faae-42d8-8e11-dc517d48caad,7f9b2fbe-1378-4a5f-b0fe-bd5895ac04f1,6c86dfdb-e1e2-47ec-ae7e-cdb7844b880b,8215761a-8fb6-47fd-9ec0-e2226947aa9d,06b93acc-81d4-43db-9d6d-bec10daee09d,51ffc8aa-0cb4-4288-b975-90a8ddeaea45,87b209bb-784b-4960-ab1f-4b8584e2cd37,9024336c-9f5c-4f8f-89dd-0d16c09791ca}'::text[]))))
  • Rows Removed by Filter: 55439
3. 198.572 198.572 ↑ 1.0 55,323 1

Seq Scan on personstatus personstatus_1 (cost=0.00..26,755.46 rows=56,274 width=44) (actual time=0.033..198.572 rows=55,323 loops=1)

  • Filter: ((statustypecode)::text = 'TC'::text)
  • Rows Removed by Filter: 562172
4. 18.895 222.869 ↑ 1.0 37,818 1

Hash (cost=26,755.46..26,755.46 rows=38,042 width=44) (actual time=222.869..222.869 rows=37,818 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 3682kB
5. 203.974 203.974 ↑ 1.0 37,818 1

Seq Scan on personstatus (cost=0.00..26,755.46 rows=38,042 width=44) (actual time=0.060..203.974 rows=37,818 loops=1)

  • Filter: ((statustypecode)::text = 'BS'::text)
  • Rows Removed by Filter: 579677
Planning time : 0.950 ms
Execution time : 471.506 ms