explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jcFr

Settings
# exclusive inclusive rows x rows loops node
1. 778.711 8,800.424 ↓ 9,996.0 9,996 1

Unique (cost=25,940.91..25,940.96 rows=1 width=294) (actual time=7,054.482..8,800.424 rows=9,996 loops=1)

2.          

CTE tef95416f02bf475ab2f4ead517e70ad0

3. 27.932 174.543 ↓ 176.1 2,993 1

Nested Loop (cost=239.01..7,640.01 rows=17 width=16) (actual time=7.059..174.543 rows=2,993 loops=1)

4. 33.939 38.863 ↓ 176.1 2,993 1

Bitmap Heap Scan on resjour (cost=238.59..7,496.66 rows=17 width=16) (actual time=6.504..38.863 rows=2,993 loops=1)

  • Recheck Cond: ((analyz)::text = 'ECBU2_URCUL'::text)
  • Filter: (btrim((resultat)::text) = ''::text)
  • Rows Removed by Filter: 414
  • Heap Blocks: exact=2827
5. 4.924 4.924 ↑ 1.0 3,415 1

Bitmap Index Scan on idx_resjour1 (cost=0.00..238.59 rows=3,489 width=0) (actual time=4.922..4.924 rows=3,415 loops=1)

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

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

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

CTE te66904f7a30c4dee9398d51929156e6c

8. 130.283 290.194 ↑ 1.1 3,298 1

Hash Join (cost=7,687.45..10,416.93 rows=3,589 width=16) (actual time=60.860..290.194 rows=3,298 loops=1)

  • Hash Cond: ((tubejour_1.numtube)::text = (resjour_1.numtube)::text)
9. 99.651 99.651 ↓ 1.0 37,291 1

Seq Scan on tubejour tubejour_1 (cost=0.00..2,633.52 rows=36,552 width=32) (actual time=0.064..99.651 rows=37,291 loops=1)

10. 11.755 60.260 ↑ 1.1 3,298 1

Hash (cost=7,642.59..7,642.59 rows=3,589 width=16) (actual time=60.257..60.260 rows=3,298 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 190kB
11. 44.076 48.505 ↑ 1.1 3,298 1

Bitmap Heap Scan on resjour resjour_1 (cost=244.37..7,642.59 rows=3,589 width=16) (actual time=5.321..48.505 rows=3,298 loops=1)

  • Recheck Cond: ((analyz)::text = 'QWBC'::text)
  • Filter: (btrim((resultat)::text) <> ''::text)
  • Rows Removed by Filter: 339
  • Heap Blocks: exact=2718
12. 4.429 4.429 ↓ 1.0 3,645 1

Bitmap Index Scan on idx_resjour1 (cost=0.00..243.48 rows=3,607 width=0) (actual time=4.427..4.429 rows=3,645 loops=1)

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

CTE t6c794bbe22914c37bf2f276f1d06375b

14. 42.116 236.909 ↓ 198.5 3,573 1

Nested Loop (cost=239.11..7,664.80 rows=18 width=16) (actual time=5.208..236.909 rows=3,573 loops=1)

15. 47.958 51.873 ↓ 198.5 3,573 1

Bitmap Heap Scan on resjour resjour_2 (cost=238.69..7,513.01 rows=18 width=16) (actual time=4.984..51.873 rows=3,573 loops=1)

  • Recheck Cond: ((analyz)::text = 'ECBU2_URGE1'::text)
  • Filter: (btrim((resultat)::text) = ''::text)
  • Rows Removed by Filter: 53
  • Heap Blocks: exact=3012
16. 3.915 3.915 ↓ 1.0 3,634 1

Bitmap Index Scan on idx_resjour1 (cost=0.00..238.69 rows=3,502 width=0) (actual time=3.913..3.915 rows=3,634 loops=1)

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

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

  • Index Cond: ((numtube)::text = (resjour_2.numtube)::text)
18. 4,458.110 8,021.713 ↓ 162,181.0 162,181 1

Sort (cost=219.17..219.17 rows=1 width=294) (actual time=7,054.465..8,021.713 rows=162,181 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: 20624kB
19. 1,057.028 3,563.603 ↓ 162,181.0 162,181 1

Nested Loop (cost=128.29..219.16 rows=1 width=294) (actual time=708.109..3,563.603 rows=162,181 loops=1)

20. 85.770 1,337.043 ↓ 9,996.0 9,996 1

Nested Loop (cost=127.86..216.71 rows=1 width=182) (actual time=707.823..1,337.043 rows=9,996 loops=1)

21. 26.717 988.773 ↓ 2,500.0 2,500 1

Hash Join (cost=127.45..212.70 rows=1 width=422) (actual time=707.661..988.773 rows=2,500 loops=1)

  • Hash Cond: ((te66904f7a30c4dee9398d51929156e6c.numtravail)::text = (form_pj.pj_numtravail)::text)
22. 315.363 315.363 ↑ 1.1 3,298 1

CTE Scan on te66904f7a30c4dee9398d51929156e6c (cost=0.00..71.78 rows=3,589 width=118) (actual time=60.878..315.363 rows=3,298 loops=1)

23. 16.022 646.693 ↓ 2,849.0 2,849 1

Hash (cost=127.44..127.44 rows=1 width=304) (actual time=646.691..646.693 rows=2,849 loops=1)

  • Buckets: 4096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 345kB
24. 38.880 630.671 ↓ 2,849.0 2,849 1

Nested Loop (cost=0.83..127.44 rows=1 width=304) (actual time=207.557..630.671 rows=2,849 loops=1)

  • Join Filter: ((tef95416f02bf475ab2f4ead517e70ad0.numtravail)::text = (form_pj.pj_numtravail)::text)
25. 25.766 489.155 ↓ 167.7 2,851 1

Hash Join (cost=0.55..1.15 rows=17 width=236) (actual time=207.191..489.155 rows=2,851 loops=1)

  • Hash Cond: ((t6c794bbe22914c37bf2f276f1d06375b.numtravail)::text = (tef95416f02bf475ab2f4ead517e70ad0.numtravail)::text)
26. 261.453 261.453 ↓ 198.5 3,573 1

CTE Scan on t6c794bbe22914c37bf2f276f1d06375b (cost=0.00..0.36 rows=18 width=118) (actual time=5.221..261.453 rows=3,573 loops=1)

27. 10.236 201.936 ↓ 176.1 2,993 1

Hash (cost=0.34..0.34 rows=17 width=118) (actual time=201.933..201.936 rows=2,993 loops=1)

  • Buckets: 4096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 173kB
28. 191.700 191.700 ↓ 176.1 2,993 1

CTE Scan on tef95416f02bf475ab2f4ead517e70ad0 (cost=0.00..0.34 rows=17 width=118) (actual time=7.074..191.700 rows=2,993 loops=1)

29. 102.636 102.636 ↑ 1.0 1 2,851

Index Scan using inx_dossier on form_pj (cost=0.28..7.42 rows=1 width=68) (actual time=0.033..0.036 rows=1 loops=2,851)

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

Index Scan using idx_tubejour2 on tubejour t (cost=0.41..4.01 rows=1 width=142) (actual time=0.067..0.105 rows=4 loops=2,500)

  • Index Cond: ((numtravail)::text = (form_pj.pj_numtravail)::text)
  • Filter: ((form_pj.pj_numtube)::text = (numcodebarre)::text)
  • Rows Removed by Filter: 0
31. 1,169.532 1,169.532 ↑ 1.2 16 9,996

Index Only Scan using idx_resjour0 on resjour r (cost=0.42..2.24 rows=19 width=16) (actual time=0.056..0.117 rows=16 loops=9,996)

  • Index Cond: (numtube = (t.numtube)::text)
  • Heap Fetches: 72901