explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1we8

Settings
# exclusive inclusive rows x rows loops node
1. 0.022 8.119 ↑ 1.0 1 1

Aggregate (cost=2,159.34..2,159.35 rows=1 width=40) (actual time=8.119..8.119 rows=1 loops=1)

2.          

CTE notes_produit

3. 0.010 8.086 ↓ 19.5 39 1

Unique (cost=2,159.27..2,159.29 rows=2 width=12) (actual time=8.072..8.086 rows=39 loops=1)

4. 0.037 8.076 ↓ 19.5 39 1

Sort (cost=2,159.27..2,159.28 rows=2 width=12) (actual time=8.070..8.076 rows=39 loops=1)

  • Sort Key: review.id, review.value
  • Sort Method: quicksort Memory: 26kB
5. 0.007 8.039 ↓ 19.5 39 1

Append (cost=4.35..2,159.26 rows=2 width=12) (actual time=0.254..8.039 rows=39 loops=1)

6. 0.017 0.032 ↓ 0.0 0 1

Bitmap Heap Scan on review (cost=4.35..29.87 rows=1 width=12) (actual time=0.032..0.032 rows=0 loops=1)

  • Recheck Cond: (pro_id = 249)
  • Filter: ((last_comment_at >= $1) AND (COALESCE(value, '0'::double precision) > '0'::double precision) AND (last_comment_at >= (now() - '760 days'::interval)))
  • Rows Removed by Filter: 7
  • Heap Blocks: exact=7
7.          

Initplan (forBitmap Heap Scan)

8. 0.003 0.003 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=1)

9. 0.012 0.012 ↑ 1.0 7 1

Bitmap Index Scan on idx_43f2f406c3b7e4ba (cost=0.00..4.33 rows=7 width=0) (actual time=0.012..0.012 rows=7 loops=1)

  • Index Cond: (pro_id = 249)
10. 0.085 8.000 ↓ 39.0 39 1

Nested Loop Anti Join (cost=2.41..2,129.37 rows=1 width=12) (actual time=0.220..8.000 rows=39 loops=1)

  • Join Filter: (review_1.pro_id = depart.pro_id)
11.          

Initplan (forNested Loop Anti Join)

12. 0.002 0.002 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1)

13. 0.052 7.825 ↓ 44.0 44 1

Nested Loop (cost=2.11..2,128.97 rows=1 width=23) (actual time=0.207..7.825 rows=44 loops=1)

14. 0.299 7.597 ↓ 44.0 44 1

Nested Loop (cost=1.69..2,128.22 rows=1 width=23) (actual time=0.200..7.597 rows=44 loops=1)

15. 0.105 5.222 ↓ 6.0 1,038 1

Nested Loop (cost=1.27..2,036.73 rows=173 width=12) (actual time=0.027..5.222 rows=1,038 loops=1)

16. 0.298 1.717 ↓ 7.3 850 1

Nested Loop (cost=0.84..1,945.83 rows=117 width=8) (actual time=0.021..1.717 rows=850 loops=1)

17. 0.219 0.219 ↓ 4.5 200 1

Index Scan using depart_pro_id_fkey on depart (cost=0.42..164.59 rows=44 width=8) (actual time=0.012..0.219 rows=200 loops=1)

  • Index Cond: (pro_id = 249)
18. 1.200 1.200 ↑ 2.2 4 200

Index Scan using dossier_dep_id_fkey on dossier (cost=0.42..40.39 rows=9 width=8) (actual time=0.003..0.006 rows=4 loops=200)

  • Index Cond: (dep_id = depart.dep_id)
19. 3.400 3.400 ↑ 3.0 1 850

Index Scan using dossier_participant_dos_id_fkey on dossier_participant (cost=0.42..0.75 rows=3 width=12) (actual time=0.003..0.004 rows=1 loops=850)

  • Index Cond: (dos_id = dossier.dos_id)
20. 2.076 2.076 ↓ 0.0 0 1,038

Index Scan using interview_reponse_dop_id_fkey on interview_reponse (cost=0.42..0.52 rows=1 width=19) (actual time=0.002..0.002 rows=0 loops=1,038)

  • Index Cond: (dop_id = dossier_participant.dop_id)
  • Filter: ((inr_satisfaction_globale IS NOT NULL) AND (inr_date_reponse >= $0) AND (inr_date_reponse >= (now() - '760 days'::interval)))
  • Rows Removed by Filter: 0
21. 0.176 0.176 ↑ 1.0 1 44

Index Scan using idx_utilisateur_id_utilisateur_atacama on utilisateur (cost=0.42..0.74 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=44)

  • Index Cond: (id_utilisateur_atacama = dossier_participant.per_id)
22. 0.088 0.088 ↓ 0.0 0 44

Index Scan using idx_43f2f406f675f31b on review review_1 (cost=0.28..0.31 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=44)

  • Index Cond: (author_id = utilisateur.id)
  • Filter: ((COALESCE(value, '0'::double precision) > '0'::double precision) AND (pro_id = 249))
  • Rows Removed by Filter: 0
23. 8.097 8.097 ↓ 19.5 39 1

CTE Scan on notes_produit (cost=0.00..0.04 rows=2 width=12) (actual time=8.073..8.097 rows=39 loops=1)