explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pq92

Settings
# exclusive inclusive rows x rows loops node
1. 0.187 639.893 ↑ 1.0 6 1

Sort (cost=35,972.86..35,972.88 rows=6 width=747) (actual time=639.840..639.893 rows=6 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: 32kB
2. 0.251 639.706 ↑ 1.0 6 1

Nested Loop Left Join (cost=35,921.60..35,972.79 rows=6 width=747) (actual time=639.028..639.706 rows=6 loops=1)

3. 0.182 639.341 ↑ 1.0 6 1

Nested Loop (cost=35,921.46..35,971.81 rows=6 width=709) (actual time=638.984..639.341 rows=6 loops=1)

4. 0.138 638.973 ↑ 1.0 6 1

HashAggregate (cost=35,921.04..35,921.10 rows=6 width=4) (actual time=638.923..638.973 rows=6 loops=1)

  • Group Key: com_1.id
5. 0.114 638.835 ↑ 1.0 6 1

Limit (cost=0.55..35,920.96 rows=6 width=118) (actual time=124.808..638.835 rows=6 loops=1)

6. 638.721 638.721 ↑ 9.3 6 1

Index Scan using company_sorting on "Companies" com_1 (cost=0.55..335,257.73 rows=56 width=118) (actual time=124.788..638.721 rows=6 loops=1)

  • Filter: (("registrationNumber")::text ~~* '%50533%'::text)
  • Rows Removed by Filter: 153628
7. 0.186 0.186 ↑ 1.0 1 6

Index Scan using "PK_999ff985663bc48d13b08bce475" on "Companies" com (cost=0.42..8.44 rows=1 width=709) (actual time=0.023..0.031 rows=1 loops=6)

  • Index Cond: (id = com_1.id)
8. 0.114 0.114 ↑ 1.0 1 6

Index Scan using "PK_5523697543970f7c5df2b0adb1b" on "EntityTypes" et (cost=0.14..0.15 rows=1 width=36) (actual time=0.011..0.019 rows=1 loops=6)

  • Index Cond: (com."entityTypeId" = id)