explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7de7

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

Merge Right Join (cost=33,307.59..153,567.81 rows=690,090 width=178) (actual time=1,293.076..3,701.537 rows=2,225,121 loops=1)

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

Index Scan using vehicle_attribute_vehicle_id_idx on vehicle_attribute vehicleatt1_ (cost=0.43..108,217.52 rows=2,268,581 width=38) (actual time=0.008..392.718 rows=1,222,843 loops=1)

3. 654.316 1,429.296 ↓ 49.2 2,225,115 1

Materialize (cost=33,307.16..33,533.31 rows=45,230 width=140) (actual time=611.555..1,429.296 rows=2,225,115 loops=1)

4. 402.827 774.980 ↓ 4.8 219,107 1

Sort (cost=33,307.16..33,420.23 rows=45,230 width=140) (actual time=611.553..774.980 rows=219,107 loops=1)

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

Hash Left Join (cost=351.20..26,561.75 rows=45,230 width=140) (actual time=7.059..372.153 rows=219,107 loops=1)

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

Nested Loop Left Join (cost=0.85..25,589.49 rows=45,230 width=105) (actual time=0.042..215.240 rows=219,107 loops=1)

7. 17.334 17.334 ↓ 2.4 2,000 1

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

  • Index Cond: (((tenant)::text = 'mb-prod'::text) AND ((platform_identifier)::text = ANY ('{34111EFE2527D684984CECBB233721DA,97E5F94B4BF7DCF751DEBFC3E1D02D9C,4DD53F4C0887F68D3DF499CAACC0CF7F,26928585BFE517609A50FBDCB66337C4,0F (...)
8. 90.000 90.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.007..0.045 rows=110 loops=2,000)

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

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

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

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