explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mdBR : Optimization for: Optimization for: plan #IGa4; plan #PFef

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 74.641 808.104 ↑ 1.0 143,904 1

Hash Join (cost=54,260.16..2,968,203.01 rows=145,378 width=68) (actual time=671.380..808.104 rows=143,904 loops=1)

  • Hash Cond: ((ecr.code_affaire)::text = (account_analytic_account.code)::text)
  • Functions: 42
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 4.826 ms, Inlining 10.117 ms, Optimization 308.468 ms, Emission 187.947 ms, Total 511.358 ms
2. 65.243 74.379 ↑ 1.0 144,578 1

Bitmap Heap Scan on ecritures_compta_maj ecr (cost=3,271.95..40,892.90 rows=145,378 width=36) (actual time=11.706..74.379 rows=144,578 loops=1)

  • Recheck Cond: ((journal)::text = ANY ('{VEN,VEF,VEX}'::text[]))
  • Heap Blocks: exact=21,707
3. 9.136 9.136 ↑ 1.0 144,578 1

Bitmap Index Scan on ecritures_compta_maj_journal_idx (cost=0.00..3,235.61 rows=145,378 width=0) (actual time=9.135..9.136 rows=144,578 loops=1)

  • Index Cond: ((journal)::text = ANY ('{VEN,VEF,VEX}'::text[]))
4. 543.940 659.084 ↑ 1.0 318,311 1

Hash (cost=47,009.32..47,009.32 rows=318,311 width=9) (actual time=659.083..659.084 rows=318,311 loops=1)

  • Buckets: 524,288 Batches: 1 Memory Usage: 17,008kB
5. 42.212 115.144 ↑ 1.0 318,311 1

Unique (cost=0.42..43,826.21 rows=318,311 width=9) (actual time=0.016..115.144 rows=318,311 loops=1)

6. 72.932 72.932 ↑ 1.0 318,311 1

Index Only Scan using account_analytic_account_code_idx on account_analytic_account (cost=0.42..43,030.43 rows=318,311 width=9) (actual time=0.015..72.932 rows=318,311 loops=1)

  • Heap Fetches: 85,283
7.          

SubPlan (for Hash Join)

8. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=8.45..9.87 rows=1 width=4) (never executed)

  • Hash Cond: (y.id = x.sales_type_id)
9. 0.000 0.000 ↓ 0.0 0

Seq Scan on cesbron_selling_type y (cost=0.00..1.30 rows=30 width=8) (never executed)

10. 0.000 0.000 ↓ 0.0 0

Hash (cost=8.44..8.44 rows=1 width=4) (never executed)

11. 0.000 0.000 ↓ 0.0 0

Index Scan using account_analytic_account_code_idx on account_analytic_account x (cost=0.42..8.44 rows=1 width=4) (never executed)

  • Index Cond: ((code)::text = (ecr.code_affaire)::text)
12. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=8.45..9.87 rows=1 width=4) (never executed)

  • Hash Cond: (y_1.id = x_1.sales_type_id)
13. 0.000 0.000 ↓ 0.0 0

Seq Scan on cesbron_selling_type y_1 (cost=0.00..1.30 rows=30 width=8) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Hash (cost=8.44..8.44 rows=1 width=4) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Index Scan using account_analytic_account_code_idx on account_analytic_account x_1 (cost=0.42..8.44 rows=1 width=4) (never executed)

  • Index Cond: ((code)::text = (ecr.code_affaire)::text)
Execution time : 816.351 ms