explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TVwt : Rapide

Settings
# exclusive inclusive rows x rows loops node
1. 610.713 6,405.441 ↓ 8,565.0 8,565 1

Unique (cost=25,138.33..25,138.38 rows=1 width=294) (actual time=5,151.429..6,405.441 rows=8,565 loops=1)

2.          

CTE tcaa7b77643db44f190523ec3ccf27b1d

3. 13.548 71.040 ↓ 166.2 2,660 1

Nested Loop (cost=228.17..7,143.75 rows=16 width=16) (actual time=3.644..71.040 rows=2,660 loops=1)

4. 12.180 14.932 ↓ 166.2 2,660 1

Bitmap Heap Scan on resjour (cost=227.75..7,008.83 rows=16 width=16) (actual time=3.567..14.932 rows=2,660 loops=1)

  • Recheck Cond: ((analyz)::text = 'ECBU2_URCUL'::text)
  • Filter: (btrim((resultat)::text) = ''::text)
  • Rows Removed by Filter: 441
  • Heap Blocks: exact=2,603
5. 2.752 2.752 ↑ 1.0 3,110 1

Bitmap Index Scan on idx_resjour1 (cost=0.00..227.75 rows=3,110 width=0) (actual time=2.750..2.752 rows=3,110 loops=1)

  • Index Cond: ((analyz)::text = 'ECBU2_URCUL'::text)
6. 42.560 42.560 ↑ 1.0 1 2,660

Index Scan using pk_tubejour on tubejour (cost=0.41..8.43 rows=1 width=32) (actual time=0.016..0.016 rows=1 loops=2,660)

  • Index Cond: ((numtube)::text = (resjour.numtube)::text)
7.          

CTE t4998696dd47b4c89a7b83eb077937f12

8. 109.836 226.649 ↑ 1.1 2,988 1

Hash Join (cost=7,295.53..10,021.61 rows=3,273 width=16) (actual time=26.959..226.649 rows=2,988 loops=1)

  • Hash Cond: ((tubejour_1.numtube)::text = (resjour_1.numtube)::text)
9. 90.118 90.118 ↓ 1.0 36,284 1

Seq Scan on tubejour tubejour_1 (cost=0.00..2,630.83 rows=36,283 width=32) (actual time=0.037..90.118 rows=36,284 loops=1)

10. 8.217 26.695 ↑ 1.1 2,988 1

Hash (cost=7,254.62..7,254.62 rows=3,273 width=16) (actual time=26.692..26.695 rows=2,988 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 175kB
11. 17.003 18.478 ↑ 1.1 2,988 1

Bitmap Heap Scan on resjour resjour_1 (cost=241.92..7,254.62 rows=3,273 width=16) (actual time=2.255..18.478 rows=2,988 loops=1)

  • Recheck Cond: ((analyz)::text = 'QWBC'::text)
  • Filter: (btrim((resultat)::text) <> ''::text)
  • Rows Removed by Filter: 296
  • Heap Blocks: exact=2,522
12. 1.475 1.475 ↓ 1.0 3,428 1

Bitmap Index Scan on idx_resjour1 (cost=0.00..241.10 rows=3,290 width=0) (actual time=1.473..1.475 rows=3,428 loops=1)

  • Index Cond: ((analyz)::text = 'QWBC'::text)
13.          

CTE t1625ac314c5b4fa9bde9b0c0f9161ddc

14. 27.904 148.690 ↓ 179.8 3,236 1

Nested Loop (cost=259.32..7,717.43 rows=18 width=16) (actual time=4.231..148.690 rows=3,236 loops=1)

15. 23.806 26.942 ↓ 179.8 3,236 1

Bitmap Heap Scan on resjour resjour_2 (cost=258.90..7,565.64 rows=18 width=16) (actual time=4.108..26.942 rows=3,236 loops=1)

  • Recheck Cond: ((analyz)::text = 'ECBU2_URGE1'::text)
  • Filter: (btrim((resultat)::text) = ''::text)
  • Rows Removed by Filter: 45
  • Heap Blocks: exact=2,719
16. 3.136 3.136 ↑ 1.1 3,289 1

Bitmap Index Scan on idx_resjour1 (cost=0.00..258.90 rows=3,530 width=0) (actual time=3.135..3.136 rows=3,289 loops=1)

  • Index Cond: ((analyz)::text = 'ECBU2_URGE1'::text)
17. 93.844 93.844 ↑ 1.0 1 3,236

Index Scan using pk_tubejour on tubejour tubejour_2 (cost=0.41..8.43 rows=1 width=32) (actual time=0.029..0.029 rows=1 loops=3,236)

  • Index Cond: ((numtube)::text = (resjour_2.numtube)::text)
18. 3,380.693 5,794.728 ↓ 142,066.0 142,066 1

Sort (cost=255.54..255.54 rows=1 width=294) (actual time=5,151.415..5,794.728 rows=142,066 loops=1)

  • Sort Key: t.numtravail, t.creerle, t.numcodebarre, ((((t.nom)::text || ' '::text) || (t.prenom)::text)), form_pj.pj_ordre, t.urgent, t.originecode, t.preleveur, t.medecin, t.zprescripteur, r.numtube, t.sexe, form_pj.pj_infos, form_pj.pj_stade, (to_char((CURRENT_TIMESTAMP - (t.dhdeballage)::timestamp with time zone), 'DDDHH24'::text)), t.dhdeballage, form_pj.pj_nom_logique
  • Sort Method: external merge Disk: 18,520kB
19. 819.797 2,414.035 ↓ 142,066.0 142,066 1

Nested Loop (cost=175.70..255.53 rows=1 width=294) (actual time=611.982..2,414.035 rows=142,066 loops=1)

20. 44.755 874.778 ↓ 8,565.0 8,565 1

Hash Join (cost=175.28..253.02 rows=1 width=182) (actual time=611.897..874.778 rows=8,565 loops=1)

  • Hash Cond: ((t4998696dd47b4c89a7b83eb077937f12.numtravail)::text = (t.numtravail)::text)
21. 245.136 245.136 ↑ 1.1 2,988 1

CTE Scan on t4998696dd47b4c89a7b83eb077937f12 (cost=0.00..65.46 rows=3,273 width=118) (actual time=26.970..245.136 rows=2,988 loops=1)

22. 42.423 584.887 ↓ 9,760.0 9,760 1

Hash (cost=175.26..175.26 rows=1 width=434) (actual time=584.885..584.887 rows=9,760 loops=1)

  • Buckets: 16,384 (originally 1024) Batches: 1 (originally 1) Memory Usage: 2,031kB
23. 66.060 542.464 ↓ 9,760.0 9,760 1

Nested Loop (cost=1.22..175.26 rows=1 width=434) (actual time=89.231..542.464 rows=9,760 loops=1)

  • Join Filter: ((tcaa7b77643db44f190523ec3ccf27b1d.numtravail)::text = (t.numtravail)::text)
24. 25.542 359.702 ↓ 195.2 2,537 1

Nested Loop (cost=0.80..119.97 rows=13 width=305) (actual time=89.200..359.702 rows=2,537 loops=1)

  • Join Filter: ((tcaa7b77643db44f190523ec3ccf27b1d.numtravail)::text = (form_pj.pj_numtravail)::text)
25. 17.531 268.198 ↓ 158.6 2,537 1

Hash Join (cost=0.52..1.11 rows=16 width=236) (actual time=89.168..268.198 rows=2,537 loops=1)

  • Hash Cond: ((t1625ac314c5b4fa9bde9b0c0f9161ddc.numtravail)::text = (tcaa7b77643db44f190523ec3ccf27b1d.numtravail)::text)
26. 165.841 165.841 ↓ 179.8 3,236 1

CTE Scan on t1625ac314c5b4fa9bde9b0c0f9161ddc (cost=0.00..0.36 rows=18 width=118) (actual time=4.246..165.841 rows=3,236 loops=1)

27. 5.061 84.826 ↓ 166.2 2,660 1

Hash (cost=0.32..0.32 rows=16 width=118) (actual time=84.824..84.826 rows=2,660 loops=1)

  • Buckets: 4,096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 157kB
28. 79.765 79.765 ↓ 166.2 2,660 1

CTE Scan on tcaa7b77643db44f190523ec3ccf27b1d (cost=0.00..0.32 rows=16 width=118) (actual time=3.656..79.765 rows=2,660 loops=1)

29. 65.962 65.962 ↑ 1.0 1 2,537

Index Scan using inx_dossier on form_pj (cost=0.28..7.42 rows=1 width=69) (actual time=0.024..0.026 rows=1 loops=2,537)

  • Index Cond: ((pj_numtravail)::text = (t1625ac314c5b4fa9bde9b0c0f9161ddc.numtravail)::text)
  • Filter: ((pj_typedoc = 1) AND ((pj_analyz)::text = 'ECBU'::text))
  • Rows Removed by Filter: 0
30. 116.702 116.702 ↓ 4.0 4 2,537

Index Scan using idx_tubejour2 on tubejour t (cost=0.41..4.24 rows=1 width=141) (actual time=0.030..0.046 rows=4 loops=2,537)

  • Index Cond: ((numtravail)::text = (form_pj.pj_numtravail)::text)
  • Filter: (((numtravail)::text <> 'Inconnu'::text) AND ((numtravail)::text <> 'Inconnu'::text) AND ((form_pj.pj_numtube)::text = (numcodebarre)::text))
  • Rows Removed by Filter: 0
31. 719.460 719.460 ↑ 1.1 17 8,565

Index Only Scan using idx_resjour0 on resjour r (cost=0.42..2.31 rows=18 width=16) (actual time=0.035..0.084 rows=17 loops=8,565)

  • Index Cond: (numtube = (t.numtube)::text)
  • Heap Fetches: 83,644