explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yWmh

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 2,783.241 ↑ 1.4 74 1

Limit (cost=171,452.33..171,454.81 rows=100 width=5) (actual time=2,783.054..2,783.241 rows=74 loops=1)

2. 0.119 2,783.235 ↑ 7.1 74 1

Unique (cost=171,452.33..171,465.43 rows=528 width=5) (actual time=2,783.053..2,783.235 rows=74 loops=1)

3. 0.000 2,783.116 ↑ 1.9 1,403 1

Sort (cost=171,452.33..171,458.88 rows=2,620 width=5) (actual time=2,783.052..2,783.116 rows=1,403 loops=1)

  • Sort Key: j8_entity_id.code
  • Sort Method: quicksort Memory: 114kB
4. 116.726 2,885.251 ↑ 1.9 1,403 1

Gather (cost=1,000.09..171,303.58 rows=2,620 width=5) (actual time=1,364.628..2,885.251 rows=1,403 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
5. 2.389 2,768.525 ↑ 2.4 351 4

Nested Loop (cost=0.09..170,041.58 rows=845 width=5) (actual time=1,587.385..2,768.525 rows=351 loops=4)

6. 1.414 2,766.130 ↑ 2.4 351 4

Nested Loop (cost=0.09..170,008.19 rows=845 width=21) (actual time=1,587.344..2,766.130 rows=351 loops=4)

7. 437.149 2,764.713 ↑ 2.4 351 4

Nested Loop Left Join (cost=0.09..169,982.55 rows=859 width=32) (actual time=1,587.304..2,764.713 rows=351 loops=4)

  • Filter: (((CASE WHEN validated_cla_plan_compta_pro.is_training THEN 'VALIDATED'::text WHEN (predicted_cla_plan_compta_pro.ratio < '0.9'::double precision) THEN 'LOW'::text WHEN (predicted_cla_plan_compta_pro.ratio >= '0.9'::double precision) THEN 'HIGH'::text ELSE 'NONE'::text END = 'LOW'::text) AND (hashed SubPlan 1)) OR ((CASE WHEN validated_cla_compte_tva_pro.is_training THEN 'VALIDATED'::text WHEN (predicted_cla_compte_tva_pro.ratio < '0.9'::double precision) THEN 'LOW'::text WHEN (predicted_cla_compte_tva_pro.ratio >= '0.9'::double precision) THEN 'HIGH'::text ELSE 'NONE'::text END = 'LOW'::text) AND (hashed SubPlan 2)))
  • Rows Removed by Filter: 181812
8. 432.015 2,327.543 ↓ 1.1 182,162 4

Nested Loop Left Join (cost=0.00..132,114.30 rows=170,698 width=58) (actual time=0.312..2,327.543 rows=182,162 loops=4)

9. 477.965 1,895.526 ↓ 1.1 182,162 4

Nested Loop Left Join (cost=0.00..99,367.08 rows=170,698 width=57) (actual time=0.306..1,895.526 rows=182,162 loops=4)

10. 916.129 1,417.559 ↓ 1.1 182,162 4

Nested Loop Left Join (cost=0.00..66,619.86 rows=170,698 width=49) (actual time=0.298..1,417.559 rows=182,162 loops=4)

11. 390.315 501.425 ↓ 1.1 182,162 4

Nested Loop (cost=0.00..33,872.63 rows=170,698 width=48) (actual time=0.170..501.425 rows=182,162 loops=4)

12. 111.108 111.108 ↑ 1.3 182,948 4

Parallel Seq Scan on invoice_line t (cost=0.00..21,547.54 rows=233,354 width=64) (actual time=0.046..111.108 rows=182,948 loops=4)

13. 0.002 0.002 ↑ 1.0 1 731,790

Index Scan using document_id_idx on document j3_document_id (cost=0.00..0.05 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=731,790)

  • Index Cond: (id = t.document_id)
  • Rows Removed by Index Recheck: 0
  • Filter: ((NOT deleted) AND (error_status = 'VALIDATED'::text))
  • Rows Removed by Filter: 0
14. 0.005 0.005 ↑ 1.0 1 728,650

Index Scan using classification_source_id_idx on classification validated_cla_plan_compta_pro (cost=0.00..0.18 rows=1 width=17) (actual time=0.004..0.005 rows=1 loops=728,650)

  • Index Cond: (source_id = t.id)
  • Rows Removed by Index Recheck: 0
  • Filter: (is_training AND (classification_label = 'plan_compta_pro'::text))
  • Rows Removed by Filter: 3
15. 0.002 0.002 ↑ 1.0 1 728,650

Index Scan using classification_source_id_idx on classification predicted_cla_plan_compta_pro (cost=0.00..0.18 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=728,650)

  • Index Cond: (source_id = t.id)
  • Rows Removed by Index Recheck: 0
  • Filter: ((NOT is_training) AND (classification_label = 'plan_compta_pro'::text))
  • Rows Removed by Filter: 3
16. 0.002 0.002 ↑ 1.0 1 728,650

Index Scan using classification_source_id_idx on classification validated_cla_compte_tva_pro (cost=0.00..0.18 rows=1 width=17) (actual time=0.001..0.002 rows=1 loops=728,650)

  • Index Cond: (source_id = t.id)
  • Rows Removed by Index Recheck: 0
  • Filter: (is_training AND (classification_label = 'compte_tva_pro'::text))
  • Rows Removed by Filter: 3
17. 0.002 0.002 ↑ 1.0 1 728,650

Index Scan using classification_source_id_idx on classification predicted_cla_compte_tva_pro (cost=0.00..0.18 rows=1 width=24) (actual time=0.001..0.002 rows=1 loops=728,650)

  • Index Cond: (source_id = t.id)
  • Rows Removed by Index Recheck: 0
  • Filter: ((NOT is_training) AND (classification_label = 'compte_tva_pro'::text))
  • Rows Removed by Filter: 3
18.          

SubPlan (forNested Loop Left Join)

19. 0.013 0.013 ↑ 1.0 3 4

Values Scan on "*VALUES*" (cost=0.00..0.04 rows=3 width=32) (actual time=0.012..0.013 rows=3 loops=4)

20. 0.006 0.006 ↑ 1.0 3 4

Values Scan on "*VALUES*_1" (cost=0.00..0.04 rows=3 width=32) (actual time=0.005..0.006 rows=3 loops=4)

21. 0.003 0.003 ↑ 1.0 1 1,403

Index Scan using entity_id_idx on entity j8_entity_id (cost=0.00..0.03 rows=1 width=21) (actual time=0.003..0.003 rows=1 loops=1,403)

  • Index Cond: (id = t.entity_id)
  • Filter: ((code IS NOT NULL) AND (type_activite = 'PRO'::text))
22. 0.006 0.006 ↑ 1.0 1 1,403

Index Scan using invoice_id_idx on invoice j9_invoice_id (cost=0.00..0.04 rows=1 width=16) (actual time=0.006..0.006 rows=1 loops=1,403)

  • Index Cond: (id = t.invoice_id)
  • Filter: (source_file = 'pdf'::text)
Planning time : 14.351 ms
Execution time : 2,886.372 ms