explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PWyH

Settings
# exclusive inclusive rows x rows loops node
1. 0.430 42,034.467 ↑ 1.0 25 1

Limit (cost=857,673.17..857,673.23 rows=25 width=378) (actual time=42,033.893..42,034.467 rows=25 loops=1)

2. 0.690 42,034.037 ↑ 1.0 25 1

Sort (cost=857,673.17..857,673.23 rows=25 width=378) (actual time=42,033.880..42,034.037 rows=25 loops=1)

  • Sort Key: ((com."mpIndex" IS NULL)), ((com."contactNum" IS NULL)), ((com.email IS NULL)), ((com.url IS NULL)), ((com."numberOfStaff" IS NULL)), ((com."shareCapDelta" IS NULL)), com."mpIndex" DESC NULLS LAST, com."contactNum", com.email, com.url, com."numberOfStaff", com."hasEmails", com."shareCapDelta", com.fullName
  • Sort Method: quicksort Memory: 37kB
3. 0.374 42,033.347 ↑ 1.0 25 1

Hash Left Join (cost=857,460.55..857,672.59 rows=25 width=378) (actual time=42,019.501..42,033.347 rows=25 loops=1)

  • Hash Cond: (com."entityTypeId" = et.id)
4. 0.677 42,032.112 ↑ 1.0 25 1

Nested Loop (cost=857,459.26..857,670.96 rows=25 width=340) (actual time=42,018.600..42,032.112 rows=25 loops=1)

5. 0.376 42,018.085 ↑ 1.0 25 1

HashAggregate (cost=857,458.83..857,459.08 rows=25 width=4) (actual time=42,017.907..42,018.085 rows=25 loops=1)

  • Group Key: com_1.id
6. 0.405 42,017.709 ↑ 1.0 25 1

Limit (cost=857,458.46..857,458.52 rows=25 width=119) (actual time=42,017.142..42,017.709 rows=25 loops=1)

7. 4,883.456 42,017.304 ↑ 21,753.2 25 1

Sort (cost=857,458.46..858,818.03 rows=543,829 width=119) (actual time=42,017.115..42,017.304 rows=25 loops=1)

  • Sort Key: ((com_1."mpIndex" IS NULL)), ((com_1."contactNum" IS NULL)), ((com_1.email IS NULL)), ((com_1.url IS NULL)), ((com_1."numberOfStaff" IS NULL)), ((com_1."shareCapDelta" IS NULL)), com_1."mpIndex" DESC NULLS LAST, com_1."contactNum", com_1.email, com_1.url, com_1."numberOfStaff", com_1."hasEmails", com_1."shareCapDelta", com_1."fullName
  • Sort Method: top-N heapsort Memory: 31kB
8. 37,018.058 37,133.848 ↓ 1.0 544,168 1

Bitmap Heap Scan on "Companies" com_1 (cost=10,191.10..842,111.99 rows=543,829 width=119) (actual time=122.708..37,133.848 rows=544,168 loops=1)

  • Recheck Cond: (("issuanceAgency")::text = 'ACRA'::text)
  • Rows Removed by Index Recheck: 8339
  • Filter: "isLive
  • Heap Blocks: exact=34883 lossy=134254
9. 115.790 115.790 ↓ 1.0 544,168 1

Bitmap Index Scan on "agencyIndex" (cost=0.00..10,055.14 rows=543,829 width=0) (actual time=115.771..115.790 rows=544,168 loops=1)

  • Index Cond: (("issuanceAgency")::text = 'ACRA'::text)
10. 13.350 13.350 ↑ 1.0 1 25

Index Scan using "PK_999ff985663bc48d13b08bce475" on "Companies" com (cost=0.42..8.47 rows=1 width=340) (actual time=0.527..0.534 rows=1 loops=25)

  • Index Cond: (id = com_1.id)
11. 0.114 0.861 ↑ 1.0 13 1

Hash (cost=1.13..1.13 rows=13 width=36) (actual time=0.849..0.861 rows=13 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
12. 0.747 0.747 ↑ 1.0 13 1

Seq Scan on "EntityTypes" et (cost=0.00..1.13 rows=13 width=36) (actual time=0.652..0.747 rows=13 loops=1)

Planning time : 0.535 ms
Execution time : 42,035.356 ms