explain.depesz.com

PostgreSQL's explain analyze made readable

Result: txXQ : TEST

Settings
# exclusive inclusive rows x rows loops node
1. 0.076 120.533 ↑ 1.0 100 1

Limit (cost=20,043.85..20,055.52 rows=100 width=281) (actual time=117.100..120.533 rows=100 loops=1)

2. 14.258 120.457 ↑ 40.5 100 1

Gather Merge (cost=20,043.85..20,516.85 rows=4,054 width=281) (actual time=117.097..120.457 rows=100 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 38.975 106.199 ↑ 9.0 226 3 / 3

Sort (cost=19,043.83..19,048.89 rows=2,027 width=281) (actual time=106.114..106.199 rows=226 loops=3)

  • Sort Key: assetentit0_.scan_code
  • Sort Method: quicksort Memory: 411kB
4. 2.059 67.224 ↑ 1.2 1,667 3 / 3

Nested Loop Left Join (cost=88.21..18,932.49 rows=2,027 width=281) (actual time=2.804..67.224 rows=1,667 loops=3)

5. 5.716 55.165 ↑ 1.2 1,667 3 / 3

Nested Loop Left Join (cost=87.92..18,313.56 rows=2,027 width=272) (actual time=2.787..55.165 rows=1,667 loops=3)

6. 2.140 41.116 ↑ 1.2 1,667 3 / 3

Hash Left Join (cost=87.49..14,307.92 rows=2,027 width=260) (actual time=2.771..41.116 rows=1,667 loops=3)

  • Hash Cond: (assetentit0_.asset_group_id = assetgroup4_.id)
7. 5.316 36.536 ↑ 1.2 1,667 3 / 3

Nested Loop (cost=58.40..14,273.48 rows=2,027 width=255) (actual time=0.268..36.536 rows=1,667 loops=3)

8. 3.667 24.553 ↑ 1.2 1,667 3 / 3

Nested Loop Left Join (cost=57.98..11,657.16 rows=2,027 width=231) (actual time=0.257..24.553 rows=1,667 loops=3)

9. 5.387 12.553 ↑ 1.2 1,667 3 / 3

Nested Loop (cost=57.56..8,210.31 rows=2,027 width=219) (actual time=0.248..12.553 rows=1,667 loops=3)

10. 1.962 2.166 ↑ 1.2 1,667 3 / 3

Parallel Bitmap Heap Scan on asset assetentit0_ (cost=57.13..4,763.47 rows=2,027 width=207) (actual time=0.236..2.166 rows=1,667 loops=3)

  • Recheck Cond: (tenant_id = '888'::bigint)
  • Heap Blocks: exact=42
11. 0.204 0.204 ↓ 1.0 5,000 1 / 3

Bitmap Index Scan on asset_tenant_id_scancode_idx (cost=0.00..55.91 rows=4,865 width=0) (actual time=0.612..0.612 rows=5,000 loops=1)

  • Index Cond: (tenant_id = '888'::bigint)
12. 5.000 5.000 ↑ 1.0 1 5,000 / 3

Index Scan using pk_location on location locationen1_ (cost=0.42..1.70 rows=1 width=28) (actual time=0.003..0.003 rows=1 loops=5,000)

  • Index Cond: (location_id = assetentit0_.default_location_id)
13. 8.333 8.333 ↑ 1.0 1 5,000 / 3

Index Scan using pk_location on location locationen2_ (cost=0.42..1.70 rows=1 width=28) (actual time=0.005..0.005 rows=1 loops=5,000)

  • Index Cond: (assetentit0_.current_location_id = location_id)
14. 6.667 6.667 ↑ 1.0 1 5,000 / 3

Index Scan using pk_employee on employee workerenti3_ (cost=0.42..1.29 rows=1 width=40) (actual time=0.004..0.004 rows=1 loops=5,000)

  • Index Cond: (employee_id = assetentit0_.responsible_employee_id)
15. 0.501 2.440 ↓ 1.0 826 3 / 3

Hash (cost=19.04..19.04 rows=804 width=21) (actual time=2.440..2.440 rows=826 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 54kB
16. 1.939 1.939 ↓ 1.0 826 3 / 3

Seq Scan on asset_group assetgroup4_ (cost=0.00..19.04 rows=804 width=21) (actual time=0.011..1.939 rows=826 loops=3)

17. 8.333 8.333 ↑ 1.0 1 5,000 / 3

Index Scan using pk_asset_additional_field on asset_additional_field assetaddit5_ (cost=0.43..1.98 rows=1 width=28) (actual time=0.005..0.005 rows=1 loops=5,000)

  • Index Cond: (assetentit0_.additional_field_id = id)
18. 10.000 10.000 ↑ 1.0 1 5,000 / 3

Index Scan using pk_asset_manufacturer on asset_manufacturer assetmanuf6_ (cost=0.29..0.31 rows=1 width=21) (actual time=0.006..0.006 rows=1 loops=5,000)

  • Index Cond: (assetaddit5_.manufacturer_id = id)
Planning time : 3.147 ms
Execution time : 120.744 ms