explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BBjy

Settings
# exclusive inclusive rows x rows loops node
1. 0.427 39,202.432 ↑ 1.0 25 1

Limit (cost=857,673.17..857,673.23 rows=25 width=378) (actual time=39,201.861..39,202.432 rows=25 loops=1)

2. 1.027 39,202.005 ↑ 1.0 25 1

Sort (cost=857,673.17..857,673.23 rows=25 width=378) (actual time=39,201.848..39,202.005 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.423 39,200.978 ↑ 1.0 25 1

Hash Left Join (cost=857,460.55..857,672.59 rows=25 width=378) (actual time=39,186.954..39,200.978 rows=25 loops=1)

  • Hash Cond: (com."entityTypeId" = et.id)
4. 0.643 39,199.735 ↑ 1.0 25 1

Nested Loop (cost=857,459.26..857,670.96 rows=25 width=340) (actual time=39,186.103..39,199.735 rows=25 loops=1)

5. 0.333 39,184.992 ↑ 1.0 25 1

HashAggregate (cost=857,458.83..857,459.08 rows=25 width=4) (actual time=39,184.826..39,184.992 rows=25 loops=1)

  • Group Key: com_1.id
6. 0.337 39,184.659 ↑ 1.0 25 1

Limit (cost=857,458.46..857,458.52 rows=25 width=119) (actual time=39,184.173..39,184.659 rows=25 loops=1)

7. 6,122.266 39,184.322 ↑ 21,753.2 25 1

Sort (cost=857,458.46..858,818.03 rows=543,829 width=119) (actual time=39,184.157..39,184.322 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. 32,966.648 33,062.056 ↓ 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=101.381..33,062.056 rows=544,168 loops=1)

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

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

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

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

  • Index Cond: (id = com_1.id)
11. 0.099 0.820 ↑ 1.0 13 1

Hash (cost=1.13..1.13 rows=13 width=36) (actual time=0.808..0.820 rows=13 loops=1)

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

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

Planning time : 0.542 ms
Execution time : 39,202.878 ms