explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PrF3

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 62.161 ↑ 33.3 6 1

GroupAggregate (cost=27,830.32..27,839.87 rows=200 width=40) (actual time=62.159..62.161 rows=6 loops=1)

  • Group Key: qry_finale.id_journal
  • Buffers: shared hit=12,596
2.          

CTE cte_ecr

3. 0.009 40.816 ↓ 1.8 301 1

Group (cost=19,672.35..19,690.24 rows=172 width=28) (actual time=40.661..40.816 rows=301 loops=1)

  • Group Key: ec.id_ecriture, ja.diary_id
  • Buffers: shared hit=8,000
4. 2.230 40.807 ↓ 2.1 301 1

Gather Merge (cost=19,672.35..19,689.52 rows=144 width=28) (actual time=40.660..40.807 rows=301 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=23,662
5. 0.031 38.577 ↓ 1.4 100 3 / 3

Group (cost=18,672.33..18,672.87 rows=72 width=28) (actual time=38.537..38.577 rows=100 loops=3)

  • Group Key: ec.id_ecriture, ja.diary_id
  • Buffers: shared hit=23,662
6. 0.073 38.546 ↓ 3.3 237 3 / 3

Sort (cost=18,672.33..18,672.51 rows=72 width=28) (actual time=38.536..38.546 rows=237 loops=3)

  • Sort Key: ec.id_ecriture, ja.diary_id
  • Sort Method: quicksort Memory: 45kB
  • Buffers: shared hit=23,662
7. 0.254 38.473 ↓ 3.3 237 3 / 3

Hash Join (cost=153.43..18,670.11 rows=72 width=28) (actual time=5.191..38.473 rows=237 loops=3)

  • Hash Cond: (le.id_compte = co.id_compte)
  • Buffers: shared hit=23,648
8. 0.310 37.900 ↑ 4.7 3,193 3 / 3

Nested Loop (cost=109.03..18,586.01 rows=15,122 width=36) (actual time=4.860..37.900 rows=3,193 loops=3)

  • Buffers: shared hit=23,411
9. 11.609 35.087 ↑ 2.4 1,252 3 / 3

Hash Join (cost=108.60..11,149.06 rows=2,977 width=28) (actual time=4.840..35.087 rows=1,252 loops=3)

  • Hash Cond: (ec.jaltps_id = ja.jaltps_id)
  • Buffers: shared hit=7,954
10. 23.274 23.274 ↑ 1.2 222,582 3 / 3

Parallel Seq Scan on ecriture ec (cost=0.00..10,367.59 rows=256,259 width=20) (actual time=0.010..23.274 rows=222,582 loops=3)

  • Buffers: shared hit=7,805
11. 0.015 0.204 ↑ 1.6 109 3 / 3

Hash (cost=106.38..106.38 rows=177 width=16) (actual time=0.204..0.204 rows=109 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 14kB
  • Buffers: shared hit=149
12. 0.189 0.189 ↑ 1.6 109 3 / 3

Index Scan using ndx_sch1_sch_jaltps_3 on jaltps ja (cost=0.29..106.38 rows=177 width=16) (actual time=0.026..0.189 rows=109 loops=3)

  • Index Cond: ((month = 8) AND (year = 2,019))
  • Buffers: shared hit=149
13. 2.503 2.503 ↑ 23.7 3 3,755 / 3

Index Scan using ndx_sch1_sch_ligne_ecriture_2 on ligne_ecriture le (cost=0.43..1.79 rows=71 width=16) (actual time=0.002..0.002 rows=3 loops=3,755)

  • Index Cond: (id_ecriture = ec.id_ecriture)
  • Buffers: shared hit=15,457
14. 0.052 0.319 ↓ 1.0 573 3 / 3

Hash (cost=37.44..37.44 rows=557 width=8) (actual time=0.319..0.319 rows=573 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 31kB
  • Buffers: shared hit=221
15. 0.267 0.267 ↓ 1.0 573 3 / 3

Index Only Scan using ndx_sch1_sch_compte_5 on compte co (cost=0.42..37.44 rows=557 width=8) (actual time=0.045..0.267 rows=573 loops=3)

  • Index Cond: (id_societe = 2)
  • Heap Fetches: 473
  • Buffers: shared hit=221
16. 0.012 62.154 ↑ 94.0 10 1

Sort (cost=8,140.09..8,142.44 rows=940 width=16) (actual time=62.154..62.154 rows=10 loops=1)

  • Sort Key: qry_finale.id_journal
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=12,596
17. 0.002 62.142 ↑ 94.0 10 1

Subquery Scan on qry_finale (cost=8,074.87..8,093.67 rows=940 width=16) (actual time=62.137..62.142 rows=10 loops=1)

  • Buffers: shared hit=12,596
18. 0.009 62.140 ↑ 94.0 10 1

HashAggregate (cost=8,074.87..8,084.27 rows=940 width=16) (actual time=62.136..62.140 rows=10 loops=1)

  • Group Key: (count(dc.id_document)), jt.diary_id
  • Buffers: shared hit=12,596
19. 0.002 62.131 ↑ 94.0 10 1

Append (cost=607.31..8,070.17 rows=940 width=16) (actual time=41.469..62.131 rows=10 loops=1)

  • Buffers: shared hit=12,596
20. 0.017 41.470 ↑ 61.5 4 1

HashAggregate (cost=607.31..609.77 rows=246 width=16) (actual time=41.468..41.470 rows=4 loops=1)

  • Group Key: jt.diary_id
  • Buffers: shared hit=9,196
21. 0.027 41.453 ↑ 2.7 90 1

Nested Loop (cost=234.05..606.08 rows=246 width=16) (actual time=41.287..41.453 rows=90 loops=1)

  • Buffers: shared hit=9,196
22. 0.080 41.336 ↑ 2.7 90 1

Hash Join (cost=233.62..253.53 rows=246 width=16) (actual time=41.278..41.336 rows=90 loops=1)

  • Hash Cond: (ld.id_ecriture = cte_ecr.id_ecriture)
  • Buffers: shared hit=8,909
23. 0.056 0.056 ↑ 1.1 773 1

Seq Scan on l_doc_ecriture ld (cost=0.00..14.33 rows=833 width=16) (actual time=0.016..0.056 rows=773 loops=1)

  • Buffers: shared hit=6
24. 0.042 41.200 ↓ 1.8 301 1

Hash (cost=231.47..231.47 rows=172 width=16) (actual time=41.200..41.200 rows=301 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 23kB
  • Buffers: shared hit=8,903
25. 0.000 41.158 ↓ 1.8 301 1

Nested Loop (cost=0.29..231.47 rows=172 width=16) (actual time=40.674..41.158 rows=301 loops=1)

  • Buffers: shared hit=8,903
26. 40.871 40.871 ↓ 1.8 301 1

CTE Scan on cte_ecr (cost=0.00..3.44 rows=172 width=16) (actual time=40.663..40.871 rows=301 loops=1)

  • Buffers: shared hit=8,000
27. 0.301 0.301 ↑ 1.0 1 301

Index Scan using sch_jaltps_pkey on jaltps jt (cost=0.29..1.33 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=301)

  • Index Cond: (jaltps_id = cte_ecr.jaltps_id)
  • Buffers: shared hit=903
28. 0.090 0.090 ↑ 1.0 1 90

Index Only Scan using ndx_sch1_sch_document on document dc (cost=0.43..1.43 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=90)

  • Index Cond: (id_document = ld.id_document)
  • Heap Fetches: 10
  • Buffers: shared hit=287
29. 0.006 20.659 ↑ 115.7 6 1

GroupAggregate (cost=7,438.86..7,451.00 rows=694 width=16) (actual time=20.655..20.659 rows=6 loops=1)

  • Group Key: jt_1.diary_id
  • Buffers: shared hit=3,400
30. 0.016 20.653 ↑ 21.0 33 1

Sort (cost=7,438.86..7,440.59 rows=694 width=16) (actual time=20.652..20.653 rows=33 loops=1)

  • Sort Key: jt_1.diary_id
  • Sort Method: quicksort Memory: 26kB
  • Buffers: shared hit=3,400
31. 0.000 20.637 ↑ 21.0 33 1

Nested Loop (cost=3,343.09..7,406.10 rows=694 width=16) (actual time=6.570..20.637 rows=33 loops=1)

  • Buffers: shared hit=3,400
32. 10.920 20.574 ↑ 21.0 33 1

Hash Join (cost=3,342.66..6,986.07 rows=694 width=16) (actual time=6.557..20.574 rows=33 loops=1)

  • Hash Cond: (ldl.id_ligne_ecriture = lec.id_ligne_ecriture)
  • Buffers: shared hit=3,272
33. 8.679 8.679 ↓ 1.0 178,795 1

Seq Scan on l_doc_ligne_ecriture ldl (cost=0.00..2,967.07 rows=178,507 width=16) (actual time=0.003..8.679 rows=178,795 loops=1)

  • Buffers: shared hit=1,182
34. 0.085 0.975 ↑ 16.9 719 1

Hash (cost=3,190.81..3,190.81 rows=12,148 width=16) (actual time=0.975..0.975 rows=719 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 162kB
  • Buffers: shared hit=2,090
35. 0.000 0.890 ↑ 16.9 719 1

Nested Loop (cost=0.72..3,190.81 rows=12,148 width=16) (actual time=0.014..0.890 rows=719 loops=1)

  • Buffers: shared hit=2,090
36. 0.004 0.325 ↓ 1.8 301 1

Nested Loop (cost=0.29..231.47 rows=172 width=16) (actual time=0.005..0.325 rows=301 loops=1)

  • Buffers: shared hit=903
37. 0.020 0.020 ↓ 1.8 301 1

CTE Scan on cte_ecr cte_ecr_1 (cost=0.00..3.44 rows=172 width=16) (actual time=0.000..0.020 rows=301 loops=1)

38. 0.301 0.301 ↑ 1.0 1 301

Index Scan using sch_jaltps_pkey on jaltps jt_1 (cost=0.29..1.33 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=301)

  • Index Cond: (jaltps_id = cte_ecr_1.jaltps_id)
  • Buffers: shared hit=903
39. 0.602 0.602 ↑ 35.5 2 301

Index Only Scan using ndx_sch1_sch_ligne_ecriture_6 on ligne_ecriture lec (cost=0.43..16.50 rows=71 width=16) (actual time=0.001..0.002 rows=2 loops=301)

  • Index Cond: (id_ecriture = cte_ecr_1.id_ecriture)
  • Heap Fetches: 518
  • Buffers: shared hit=1,187
40. 0.066 0.066 ↑ 1.0 1 33

Index Only Scan using ndx_sch1_sch_document on document dc_1 (cost=0.43..0.61 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=33)

  • Index Cond: (id_document = ldl.id_document)
  • Heap Fetches: 25
  • Buffers: shared hit=128