explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PIMB

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.021 ↓ 0.0 0 1

Limit (cost=50.91..50.91 rows=1 width=710) (actual time=0.021..0.021 rows=0 loops=1)

2. 0.012 0.020 ↓ 0.0 0 1

Sort (cost=50.91..50.91 rows=1 width=710) (actual time=0.020..0.020 rows=0 loops=1)

  • Sort Key: "AlprRecognition"."createdAt" DESC
  • Sort Method: quicksort Memory: 25kB
3. 0.001 0.008 ↓ 0.0 0 1

Nested Loop Left Join (cost=28.63..50.90 rows=1 width=710) (actual time=0.008..0.008 rows=0 loops=1)

4. 0.001 0.007 ↓ 0.0 0 1

Nested Loop Left Join (cost=28.50..50.73 rows=1 width=678) (actual time=0.007..0.007 rows=0 loops=1)

5. 0.000 0.006 ↓ 0.0 0 1

Nested Loop (cost=0.42..22.16 rows=1 width=654) (actual time=0.006..0.006 rows=0 loops=1)

6. 0.000 0.006 ↓ 0.0 0 1

Nested Loop (cost=0.14..13.86 rows=1 width=637) (actual time=0.006..0.006 rows=0 loops=1)

7. 0.006 0.006 ↓ 0.0 0 1

Index Scan using alprrecognition_equipmentid_index on "AlprRecognition" (cost=0.14..8.16 rows=1 width=620) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: ("equipmentId" = '1'::bigint)
  • Filter: (("createdAt" >= '2020-01-09 13:42:29.543+02'::timestamp with time zone) AND ("siteId" = 1))
8. 0.000 0.000 ↓ 0.0 0

Seq Scan on "Equipment" (cost=0.00..5.69 rows=1 width=25) (never executed)

  • Filter: (id = '1'::bigint)
9. 0.000 0.000 ↓ 0.0 0

Index Scan using "Vehicle_pkey" on "Vehicle" (cost=0.28..8.29 rows=1 width=25) (never executed)

  • Index Cond: (id = "AlprRecognition"."vehicleId")
10. 0.000 0.000 ↓ 0.0 0

Index Scan using "OperationPermission_pkey" on "OperationPermission" (cost=28.08..28.56 rows=1 width=32) (never executed)

  • Index Cond: (id = (SubPlan 1))
11.          

SubPlan (for Index Scan)

12. 0.000 0.000 ↓ 0.0 0

Limit (cost=27.79..27.80 rows=1 width=44) (never executed)

13. 0.000 0.000 ↓ 0.0 0

Sort (cost=27.79..27.80 rows=1 width=44) (never executed)

  • Sort Key: "OperationPermission_1"."validBefore" DESC, "OperationPermission_1"."haltedAt" DESC, "OperationPermission_1"."paymentSubscriptionId" DESC NULLS LAST, "OperationPermissionQuantity"."quantityLeft" DESC, "OperationPermission_1"."createdAt" DESC
14. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=15.14..27.78 rows=1 width=44) (never executed)

  • Filter: (("OperationPermissionQuantity"."quantityLeft" IS NULL) OR ("OperationPermissionQuantity"."quantityLeft" > 0))
15. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=14.86..20.27 rows=1 width=40) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Seq Scan on "Product" "Product_1" (cost=0.00..1.39 rows=1 width=8) (never executed)

  • Filter: ("operatorId" = 1)
17. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on "OperationPermission" "OperationPermission_1" (cost=14.86..18.87 rows=1 width=48) (never executed)

  • Recheck Cond: (("vehicleId" = "Vehicle".id) AND ("productId" = "Product_1".id))
18. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=14.86..14.86 rows=1 width=0) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on operationpermission_vehicleid_index (cost=0.00..4.36 rows=10 width=0) (never executed)

  • Index Cond: ("vehicleId" = "Vehicle".id)
20. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on operationpermission_productid_index (cost=0.00..10.25 rows=262 width=0) (never executed)

  • Index Cond: ("productId" = "Product_1".id)
21. 0.000 0.000 ↓ 0.0 0

Index Scan using operationpermissionquantity_operationpermissionid_index on "OperationPermissionQuantity" (cost=0.28..7.50 rows=1 width=12) (never executed)

  • Index Cond: ("operationPermissionId" = "OperationPermission_1".id)
22. 0.000 0.000 ↓ 0.0 0

Index Scan using "Product_pkey" on "Product" (cost=0.14..0.16 rows=1 width=40) (never executed)

  • Index Cond: (id = "OperationPermission"."productId")