explain.depesz.com

PostgreSQL's explain analyze made readable

Result: spt

Settings
# exclusive inclusive rows x rows loops node
1. 1,612.519 3,315.059 ↓ 3.2 2,225,121 1

Merge Right Join (cost=33,320.26..153,764.34 rows=691,343 width=178) (actual time=1,291.251..3,315.059 rows=2,225,121 loops=1)

  • Merge Cond: (vehicleatt1_.vehicle_id = vehicle0_.id)
2. 405.528 405.528 ↑ 1.9 1,222,844 1

Index Scan using vehicle_attribute_vehicle_id_idx on vehicle_attribute vehicleatt1_ (cost=0.43..108,377.89 rows=2,272,879 width=38) (actual time=0.008..405.528 rows=1,222,844 loops=1)

3. 569.659 1,297.012 ↓ 49.1 2,225,115 1

Materialize (cost=33,319.83..33,546.23 rows=45,280 width=140) (actual time=586.529..1,297.012 rows=2,225,115 loops=1)

4. 373.732 727.353 ↓ 4.8 219,107 1

Sort (cost=33,319.83..33,433.03 rows=45,280 width=140) (actual time=586.527..727.353 rows=219,107 loops=1)

  • Sort Key: vehicle0_.id
  • Sort Method: external merge Disk: 30568kB
5. 140.619 353.621 ↓ 4.8 219,107 1

Hash Left Join (cost=351.20..26,566.70 rows=45,280 width=140) (actual time=7.028..353.621 rows=219,107 loops=1)

  • Hash Cond: (capabiliti2_.capabilities_id = capability3_.id)
6. 105.674 206.026 ↓ 4.8 219,107 1

Nested Loop Left Join (cost=0.85..25,593.75 rows=45,280 width=105) (actual time=0.028..206.026 rows=219,107 loops=1)

7. 16.352 16.352 ↓ 2.4 2,000 1

Index Scan using vehicle_tenant_platform_id on vehicle vehicle0_ (cost=0.42..7,561.71 rows=832 width=89) (actual time=0.017..16.352 rows=2,000 loops=1)

  • Index Cond: (((tenant)::text = 'mb-prod'::text) AND ((platform_identifier)::text = ANY ('{34111EFE2527D684984CECBB233721DA,97E5F94B4BF7DCF751DEBFC3E1D02D9C,4DD53F4C0887F68D3DF499CAACC0CF7F,26928585BFE517609A50FBDCB66337C4,0F (...)
8. 84.000 84.000 ↑ 1.8 110 2,000

Index Scan using vehicle_capability_vehicles_id_idx on vehicle_capability capabiliti2_ (cost=0.43..19.72 rows=195 width=16) (actual time=0.006..0.042 rows=110 loops=2,000)

  • Index Cond: (vehicle0_.id = vehicles_id)
9. 3.794 6.976 ↓ 1.0 11,185 1

Hash (cost=214.60..214.60 rows=10,860 width=35) (actual time=6.976..6.976 rows=11,185 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 870kB
10. 3.182 3.182 ↓ 1.0 11,185 1

Seq Scan on capability capability3_ (cost=0.00..214.60 rows=10,860 width=35) (actual time=0.004..3.182 rows=11,185 loops=1)