explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YPby

Settings
# exclusive inclusive rows x rows loops node
1. 0.564 1,146.130 ↑ 1.0 25 1

Limit (cost=88,286.22..88,286.28 rows=25 width=376) (actual time=1,145.504..1,146.130 rows=25 loops=1)

2. 0.767 1,145.566 ↑ 1.0 25 1

Sort (cost=88,286.22..88,286.28 rows=25 width=376) (actual time=1,145.408..1,145.566 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.387 1,144.799 ↑ 1.0 25 1

Hash Left Join (cost=88,078.11..88,285.64 rows=25 width=376) (actual time=1,125.085..1,144.799 rows=25 loops=1)

  • Hash Cond: (com."entityTypeId" = et.id)
4. 0.767 1,144.216 ↑ 1.0 25 1

Nested Loop (cost=88,076.81..88,284.01 rows=25 width=338) (actual time=1,124.871..1,144.216 rows=25 loops=1)

5. 0.388 1,123.474 ↑ 1.0 25 1

HashAggregate (cost=88,072.38..88,072.63 rows=25 width=4) (actual time=1,123.255..1,123.474 rows=25 loops=1)

  • Group Key: com_1.id
6. 0.524 1,123.086 ↑ 1.0 25 1

Limit (cost=88,072.01..88,072.07 rows=25 width=118) (actual time=1,122.391..1,123.086 rows=25 loops=1)

7. 171.344 1,122.562 ↑ 965.2 25 1

Sort (cost=88,072.01..88,132.33 rows=24,129 width=118) (actual time=1,122.378..1,122.562 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. 868.270 951.218 ↑ 1.1 22,423 1

Bitmap Heap Scan on "Companies" com_1 (cost=589.13..87,391.10 rows=24,129 width=118) (actual time=85.883..951.218 rows=22,423 loops=1)

  • Recheck Cond: ((("businessActivity")::text ~* '.*\ymanufacture\y.*'::text) OR (("primaryDescribedActivity")::text ~* '.*\ymanufacture\y.*'::text) OR (("primarySsicDescription")::text ~* '.*\ymanufacture\y.*'::text))
  • Rows Removed by Index Recheck: 1042
  • Filter: ("isLive" AND (("issuanceAgency")::text = 'ACRA'::text))
  • Heap Blocks: exact=20585
9. 0.000 82.948 ↓ 0.0 0 1

BitmapOr (cost=589.13..589.13 rows=24,938 width=0) (actual time=82.930..82.948 rows=0 loops=1)

10. 0.289 0.289 ↓ 0.0 0 1

Bitmap Index Scan on "businessIndex" (cost=0.00..120.42 rows=56 width=0) (actual time=0.270..0.289 rows=0 loops=1)

  • Index Cond: (("businessActivity")::text ~* '.*\ymanufacture\y.*'::text)
11. 24.495 24.495 ↓ 2.2 4,184 1

Bitmap Index Scan on "businessIndex" (cost=0.00..134.43 rows=1,924 width=0) (actual time=24.477..24.495 rows=4,184 loops=1)

  • Index Cond: (("primaryDescribedActivity")::text ~* '.*\ymanufacture\y.*'::text)
12. 58.175 58.175 ↑ 1.0 22,399 1

Bitmap Index Scan on "businessIndex" (cost=0.00..316.19 rows=22,959 width=0) (actual time=58.156..58.175 rows=22,399 loops=1)

  • Index Cond: (("primarySsicDescription")::text ~* '.*\ymanufacture\y.*'::text)
13. 1.300 19.975 ↑ 1.0 1 25

Bitmap Heap Scan on "Companies" com (cost=4.43..8.45 rows=1 width=338) (actual time=0.791..0.799 rows=1 loops=25)

  • Recheck Cond: (id = com_1.id)
  • Heap Blocks: exact=25
14. 18.675 18.675 ↑ 1.0 1 25

Bitmap Index Scan on "PK_999ff985663bc48d13b08bce475" (cost=0.00..4.43 rows=1 width=0) (actual time=0.746..0.747 rows=1 loops=25)

  • Index Cond: (id = com_1.id)
15. 0.093 0.196 ↑ 1.0 13 1

Hash (cost=1.13..1.13 rows=13 width=36) (actual time=0.184..0.196 rows=13 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
16. 0.103 0.103 ↑ 1.0 13 1

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

Planning time : 22.382 ms
Execution time : 1,146.920 ms