explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YEcM

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 8.808 63,032.286 ↓ 48.0 1,967 1

Sort (cost=184,884.49..184,884.59 rows=41 width=192) (actual time=63,032.198..63,032.286 rows=1,967 loops=1)

  • Sort Key: cmmovime.fav_numero, cmmovime.mco_data, cmmovime.mco_riga
  • Sort Method: quicksort Memory: 517kB
2. 16.178 63,023.478 ↓ 48.0 1,967 1

Nested Loop Left Join (cost=121.58..184,883.39 rows=41 width=192) (actual time=63.788..63,023.478 rows=1,967 loops=1)

3. 12.912 62,973.861 ↓ 48.0 1,967 1

Bitmap Heap Scan on cmmovime (cost=121.30..184,803.44 rows=41 width=114) (actual time=63.747..62,973.861 rows=1,967 loops=1)

  • Recheck Cond: ((fav_gruppo = '2019IT'::bpchar) AND (mco_data >= '01-01-2019'::date) AND (mco_data <= '31-01-2019'::date))
  • Filter: ((SubPlan 1) <> 0)
  • Rows Removed by Filter: 2
  • Heap Blocks: exact=103
4. 0.052 2.174 ↓ 0.0 0 1

BitmapAnd (cost=121.30..121.30 rows=41 width=0) (actual time=2.174..2.174 rows=0 loops=1)

5. 1.072 1.072 ↓ 1.0 7,831 1

Bitmap Index Scan on idx_cmmovime_3 (cost=0.00..51.72 rows=7,798 width=0) (actual time=1.072..1.072 rows=7,831 loops=1)

  • Index Cond: (fav_gruppo = '2019IT'::bpchar)
6. 1.050 1.050 ↓ 1.0 7,210 1

Bitmap Index Scan on cmmovime_pkey (cost=0.00..69.31 rows=6,980 width=0) (actual time=1.049..1.050 rows=7,210 loops=1)

  • Index Cond: ((mco_data >= '01-01-2019'::date) AND (mco_data <= '31-01-2019'::date))
7.          

SubPlan (forBitmap Heap Scan)

8. 23.628 62,958.775 ↑ 1.0 1 1,969

Aggregate (cost=4,503.43..4,503.43 rows=1 width=8) (actual time=31.975..31.975 rows=1 loops=1,969)

9. 62,935.147 62,935.147 ↑ 1.0 1 1,969

Seq Scan on cvfattut (cost=0.00..4,503.42 rows=1 width=0) (actual time=31.393..31.963 rows=1 loops=1,969)

  • Filter: ((mco_data = cmmovime.mco_data) AND (mco_numero = cmmovime.mco_numero))
  • Rows Removed by Filter: 122552
10. 33.439 33.439 ↑ 1.0 1 1,967

Index Scan using snsottoc_pkey on snsottoc (cost=0.29..1.95 rows=1 width=31) (actual time=0.017..0.017 rows=1 loops=1,967)

  • Index Cond: (sottoconto = cmmovime.sottoconto)
Planning time : 3.290 ms
Execution time : 63,033.110 ms