explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DsI : Optimization for: Optimization for: Optimization for: plan #ZNyR; plan #QKQB; plan #euEe

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.010 4.371 ↑ 4.0 1 1

Sort (cost=216.22..216.23 rows=4 width=162) (actual time=4.370..4.371 rows=1 loops=1)

  • Sort Key: woa.archive_date DESC, woa.id DESC, wola.sort_order
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=163
2. 0.004 4.361 ↑ 4.0 1 1

Nested Loop Left Join (cost=0.00..216.18 rows=4 width=162) (actual time=2.786..4.361 rows=1 loops=1)

  • Buffers: shared hit=163
3. 0.516 4.315 ↑ 4.0 1 1

Nested Loop (cost=0.00..150.14 rows=4 width=149) (actual time=2.740..4.315 rows=1 loops=1)

  • Join Filter: (wola.archive_uuid = woa.archive_uuid)
  • Rows Removed by Join Filter: 999
  • Buffers: shared hit=151
4. 0.134 3.799 ↓ 111.1 1,000 1

Append (cost=0.00..35.66 rows=9 width=78) (actual time=0.288..3.799 rows=1,000 loops=1)

  • Buffers: shared hit=125
5. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on gms_workorder_line_archive wola (cost=0.00..0.00 rows=1 width=148) (actual time=0.002..0.002 rows=0 loops=1)

  • Filter: ((is_placeholder IS FALSE) AND (company_uuid = '11111111-0000-0000-0000-000000000000'::uuid) AND ('b'::text <% ((COALESCE(code_custom, ''::text) || ' '::text) || COALESCE(description_custom, ''::text))))
6. 0.065 0.065 ↓ 0.0 0 1

Index Scan using idx_gms_workorder_line_invoice_line_code_description on gms_workorder_line_invoice wola_1 (cost=0.14..8.16 rows=1 width=66) (actual time=0.065..0.065 rows=0 loops=1)

  • Index Cond: ('b'::text <% ((COALESCE(code_custom, ''::text) || ' '::text) || COALESCE(description_custom, ''::text)))
  • Filter: ((is_placeholder IS FALSE) AND (company_uuid = '11111111-0000-0000-0000-000000000000'::uuid))
  • Buffers: shared hit=3
7. 0.066 0.066 ↓ 0.0 0 1

Seq Scan on gms_workorder_line_portal_archive wola_2 (cost=0.00..2.20 rows=1 width=148) (actual time=0.066..0.066 rows=0 loops=1)

  • Filter: ((is_placeholder IS FALSE) AND (company_uuid = '11111111-0000-0000-0000-000000000000'::uuid) AND ('b'::text <% ((COALESCE(code_custom, ''::text) || ' '::text) || COALESCE(description_custom, ''::text))))
  • Rows Removed by Filter: 10
  • Buffers: shared hit=2
8. 3.394 3.532 ↓ 166.7 1,000 1

Bitmap Heap Scan on gms_workorder_line_external_archive wola_3 (cost=4.19..25.26 rows=6 width=57) (actual time=0.155..3.532 rows=1,000 loops=1)

  • Recheck Cond: ('b'::text <% ((COALESCE(code_custom, ''::text) || ' '::text) || COALESCE(description_custom, ''::text)))
  • Filter: ((is_placeholder IS FALSE) AND (company_uuid = '11111111-0000-0000-0000-000000000000'::uuid))
  • Heap Blocks: exact=104
  • Buffers: shared hit=120
9. 0.138 0.138 ↓ 166.7 1,000 1

Bitmap Index Scan on idx_gms_workorder_line_external_archive_line_code_description (cost=0.00..4.19 rows=6 width=0) (actual time=0.138..0.138 rows=1,000 loops=1)

  • Index Cond: ('b'::text <% ((COALESCE(code_custom, ''::text) || ' '::text) || COALESCE(description_custom, ''::text)))
  • Buffers: shared hit=16
10. 0.000 0.000 ↑ 4.0 1 1,000

Materialize (cost=0.00..113.95 rows=4 width=87) (actual time=0.000..0.000 rows=1 loops=1,000)

  • Buffers: shared hit=26
11. 0.000 0.099 ↑ 4.0 1 1

Append (cost=0.00..113.93 rows=4 width=87) (actual time=0.048..0.099 rows=1 loops=1)

  • Buffers: shared hit=26
12. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on gms_workorder_archive woa (cost=0.00..0.00 rows=1 width=100) (actual time=0.002..0.002 rows=0 loops=1)

  • Filter: ((company_uuid = '11111111-0000-0000-0000-000000000000'::uuid) AND (vehicle_uuid = 'f0c6d48d-ea2c-4882-be85-f422e0d056fa'::uuid))
13. 0.012 0.012 ↓ 0.0 0 1

Seq Scan on gms_workorder_invoice woa_1 (cost=0.00..5.43 rows=1 width=64) (actual time=0.012..0.012 rows=0 loops=1)

  • Filter: ((company_uuid = '11111111-0000-0000-0000-000000000000'::uuid) AND (vehicle_uuid = 'f0c6d48d-ea2c-4882-be85-f422e0d056fa'::uuid))
  • Rows Removed by Filter: 31
  • Buffers: shared hit=5
14. 0.009 0.009 ↓ 0.0 0 1

Index Scan using gms_workorder_portal_archive_pkey on gms_workorder_portal_archive woa_2 (cost=0.14..8.16 rows=1 width=100) (actual time=0.009..0.009 rows=0 loops=1)

  • Index Cond: (company_uuid = '11111111-0000-0000-0000-000000000000'::uuid)
  • Filter: (vehicle_uuid = 'f0c6d48d-ea2c-4882-be85-f422e0d056fa'::uuid)
  • Rows Removed by Filter: 3
  • Buffers: shared hit=2
15. 0.076 0.076 ↑ 1.0 1 1

Index Scan using idx_gms_workorder_external_archive_company_vehicle_uuid on gms_workorder_external_archive woa_3 (cost=0.28..100.31 rows=1 width=85) (actual time=0.026..0.076 rows=1 loops=1)

  • Index Cond: ((company_uuid = '11111111-0000-0000-0000-000000000000'::uuid) AND (vehicle_uuid = 'f0c6d48d-ea2c-4882-be85-f422e0d056fa'::uuid))
  • Buffers: shared hit=19
16. 0.002 0.042 ↑ 3.0 1 1

Append (cost=0.00..16.48 rows=3 width=61) (actual time=0.042..0.042 rows=1 loops=1)

  • Buffers: shared hit=12
17. 0.004 0.004 ↓ 0.0 0 1

Seq Scan on gms_vehicle_archive v (cost=0.00..0.00 rows=1 width=68) (actual time=0.004..0.004 rows=0 loops=1)

  • Filter: ((company_uuid = '11111111-0000-0000-0000-000000000000'::uuid) AND (uuid = 'f0c6d48d-ea2c-4882-be85-f422e0d056fa'::uuid) AND (woa.vehicle_uuid = uuid) AND (woa.archive_uuid = archive_uuid))
18. 0.028 0.028 ↓ 0.0 0 1

Index Scan using gms_vehicle_invoice_unique_inventory_vehicle_transaction on gms_vehicle_invoice v_1 (cost=0.14..8.16 rows=1 width=68) (actual time=0.028..0.028 rows=0 loops=1)

  • Index Cond: (company_uuid = '11111111-0000-0000-0000-000000000000'::uuid)
  • Filter: ((uuid = 'f0c6d48d-ea2c-4882-be85-f422e0d056fa'::uuid) AND (woa.vehicle_uuid = uuid) AND (woa.archive_uuid = archive_uuid))
  • Rows Removed by Filter: 21
  • Buffers: shared hit=9
19. 0.008 0.008 ↑ 1.0 1 1

Index Scan using gms_vehicle_external_archive_pkey on gms_vehicle_external_archive v_2 (cost=0.28..8.30 rows=1 width=47) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: ((company_uuid = '11111111-0000-0000-0000-000000000000'::uuid) AND (woa.archive_uuid = archive_uuid))
  • Filter: ((uuid = 'f0c6d48d-ea2c-4882-be85-f422e0d056fa'::uuid) AND (woa.vehicle_uuid = uuid))
  • Buffers: shared hit=3
Planning time : 0.802 ms
Execution time : 4.546 ms