explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.011 16.213 ↑ 4.0 1 1

Sort (cost=238.37..238.38 rows=4 width=161) (actual time=16.213..16.213 rows=1 loops=1)

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

Nested Loop Left Join (cost=0.00..238.33 rows=4 width=161) (actual time=4.895..16.202 rows=1 loops=1)

  • Buffers: shared hit=392
3. 0.775 16.117 ↑ 4.0 1 1

Nested Loop (cost=0.00..172.28 rows=4 width=148) (actual time=4.811..16.117 rows=1 loops=1)

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

Append (cost=0.00..56.89 rows=9 width=78) (actual time=0.804..15.342 rows=1,000 loops=1)

  • Buffers: shared hit=355
5. 0.004 0.004 ↓ 0.0 0 1

Seq Scan on gms_workorder_line_archive wola (cost=0.00..0.00 rows=1 width=148) (actual time=0.004..0.004 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.049 0.049 ↓ 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.049..0.049 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.067 0.067 ↓ 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.067..0.067 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. 14.448 15.073 ↓ 166.7 1,000 1

Bitmap Heap Scan on gms_workorder_line_external_archive wola_3 (cost=4.37..46.48 rows=6 width=56) (actual time=0.682..15.073 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))
  • Rows Removed by Filter: 2,000
  • Heap Blocks: exact=311
  • Buffers: shared hit=350
9. 0.625 0.625 ↓ 250.0 3,000 1

Bitmap Index Scan on idx_gms_workorder_line_external_archive_line_code_description (cost=0.00..4.37 rows=12 width=0) (actual time=0.624..0.625 rows=3,000 loops=1)

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

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

  • Buffers: shared hit=25
11. 0.002 0.155 ↑ 4.0 1 1

Append (cost=0.00..114.84 rows=4 width=87) (actual time=0.090..0.155 rows=1 loops=1)

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

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

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

Seq Scan on gms_workorder_invoice woa_1 (cost=0.00..5.46 rows=1 width=64) (actual time=0.038..0.038 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.014 0.014 ↓ 0.0 0 1

Seq Scan on gms_workorder_portal_archive woa_2 (cost=0.00..1.04 rows=1 width=100) (actual time=0.014..0.014 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: 3
  • Buffers: shared hit=1
15. 0.097 0.097 ↑ 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..108.31 rows=1 width=85) (actual time=0.032..0.097 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.003 0.078 ↑ 3.0 1 1

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

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

Seq Scan on gms_vehicle_archive v (cost=0.00..0.00 rows=1 width=68) (actual time=0.019..0.019 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.043 0.043 ↓ 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.043..0.043 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.013 0.013 ↑ 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.013..0.013 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 : 1.180 ms
Execution time : 16.405 ms