explain.depesz.com

PostgreSQL's explain analyze made readable

Result: n0VC

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.123 21.462 ↑ 3.3 30 1

ProjectSet (cost=5,658.49..5,663.05 rows=100 width=66) (actual time=20.145..21.462 rows=30 loops=1)

2.          

CTE _transacts

3. 5.899 6.273 ↑ 1.1 804 1

Bitmap Heap Scan on akto_transacciones_clientes_particulares (cost=32.77..5,605.40 rows=896 width=41) (actual time=0.672..6.273 rows=804 loops=1)

  • Recheck Cond: (n_concesion = 37217)
  • Filter: ((fecha >= '2019-01-01'::date) AND (fecha <= '2019-12-31'::date) AND (descripcion = 'GASOLEO A'::text))
  • Rows Removed by Filter: 1507
  • Heap Blocks: exact=2261
4. 0.374 0.374 ↓ 1.4 2,311 1

Bitmap Index Scan on _trans_cpart_n_conces_idx (cost=0.00..32.55 rows=1,616 width=0) (actual time=0.374..0.374 rows=2,311 loops=1)

  • Index Cond: (n_concesion = 37217)
5. 0.023 21.339 ↓ 30.0 30 1

Nested Loop (cost=53.09..57.14 rows=1 width=66) (actual time=20.130..21.339 rows=30 loops=1)

6. 0.202 6.789 ↑ 1.0 1 1

Aggregate (cost=20.16..20.17 rows=1 width=32) (actual time=6.789..6.789 rows=1 loops=1)

7. 6.587 6.587 ↑ 1.1 804 1

CTE Scan on _transacts (cost=0.00..17.92 rows=896 width=32) (actual time=0.674..6.587 rows=804 loops=1)

8. 1.316 14.527 ↓ 30.0 30 1

Bitmap Heap Scan on akto_estaciones_clientes_particulares e (cost=32.93..36.95 rows=1 width=66) (actual time=13.324..14.527 rows=30 loops=1)

  • Recheck Cond: ((n_concesion = '37217'::numeric) AND (id_socios <@ (array_agg(_transacts.id_socio))))
  • Rows Removed by Index Recheck: 24
  • Filter: (distance < '50'::numeric)
  • Heap Blocks: exact=54
9. 0.016 13.211 ↓ 0.0 0 1

BitmapAnd (cost=32.93..32.93 rows=1 width=0) (actual time=13.211..13.211 rows=0 loops=1)

10. 0.039 0.039 ↓ 1.3 143 1

Bitmap Index Scan on akto_estaciones_clientes_part_cod_est_idx (cost=0.00..5.25 rows=111 width=0) (actual time=0.039..0.039 rows=143 loops=1)

  • Index Cond: (n_concesion = '37217'::numeric)
11. 13.156 13.156 ↑ 9.9 100 1

Bitmap Index Scan on akto_estaciones_clientes_part_id_soc_idx (cost=0.00..27.40 rows=987 width=0) (actual time=13.156..13.156 rows=100 loops=1)

  • Index Cond: (id_socios <@ (array_agg(_transacts.id_socio)))