explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MQWp

Settings
# exclusive inclusive rows x rows loops node
1. 0.121 21.989 ↑ 4.2 113 1

GroupAggregate (cost=9,574.09..9,597.64 rows=471 width=136) (actual time=21.886..21.989 rows=113 loops=1)

  • Group Key: cp.cartodb_id
2. 0.132 21.868 ↑ 4.2 113 1

Sort (cost=9,574.09..9,575.26 rows=471 width=104) (actual time=21.861..21.868 rows=113 loops=1)

  • Sort Key: cp.cartodb_id
  • Sort Method: quicksort Memory: 40kB
3. 0.096 21.736 ↑ 4.2 113 1

Nested Loop (cost=5,727.67..9,553.18 rows=471 width=104) (actual time=19.524..21.736 rows=113 loops=1)

4. 0.094 19.606 ↑ 4.0 113 1

Hash Join (cost=5,727.12..5,752.86 rows=448 width=64) (actual time=19.483..19.606 rows=113 loops=1)

  • Hash Cond: (t.id_socio = (unnest(e.id_socios)))
5.          

CTE _transacts

6. 0.219 7.111 ↑ 4.6 196 1

GroupAggregate (cost=5,649.34..5,667.25 rows=895 width=73) (actual time=6.879..7.111 rows=196 loops=1)

  • Group Key: akto_transacciones_clientes_particulares.id_socio
7. 0.490 6.892 ↑ 1.9 483 1

Sort (cost=5,649.34..5,651.58 rows=896 width=49) (actual time=6.863..6.892 rows=483 loops=1)

  • Sort Key: akto_transacciones_clientes_particulares.id_socio
  • Sort Method: quicksort Memory: 91kB
8. 6.083 6.402 ↑ 1.9 483 1

Bitmap Heap Scan on akto_transacciones_clientes_particulares (cost=32.77..5,605.40 rows=896 width=49) (actual time=0.477..6.402 rows=483 loops=1)

  • Recheck Cond: (n_concesion = 20673)
  • Filter: ((fecha >= '2018-01-01'::date) AND (fecha <= '2019-12-31'::date) AND (descripcion = 'GASOLEO A'::text))
  • Rows Removed by Filter: 446
  • Heap Blocks: exact=923
9. 0.319 0.319 ↑ 1.7 929 1

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

  • Index Cond: (n_concesion = 20673)
10. 6.946 6.946 ↑ 4.6 196 1

CTE Scan on _transacts t (cost=0.00..17.90 rows=895 width=64) (actual time=6.882..6.946 rows=196 loops=1)

11. 0.050 12.566 ↓ 1.1 113 1

Hash (cost=58.62..58.62 rows=100 width=32) (actual time=12.566..12.566 rows=113 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
12. 0.546 12.516 ↓ 1.1 113 1

ProjectSet (cost=53.07..57.62 rows=100 width=32) (actual time=7.633..12.516 rows=113 loops=1)

13. 0.032 11.970 ↓ 113.0 113 1

Nested Loop (cost=53.07..57.12 rows=1 width=32) (actual time=7.614..11.970 rows=113 loops=1)

14. 0.070 0.384 ↑ 1.0 1 1

Aggregate (cost=20.14..20.15 rows=1 width=32) (actual time=0.383..0.384 rows=1 loops=1)

15. 0.314 0.314 ↑ 4.6 196 1

CTE Scan on _transacts (cost=0.00..17.90 rows=895 width=32) (actual time=0.001..0.314 rows=196 loops=1)

16. 4.648 11.554 ↓ 113.0 113 1

Bitmap Heap Scan on akto_estaciones_clientes_particulares e (cost=32.93..36.95 rows=1 width=32) (actual time=7.218..11.554 rows=113 loops=1)

  • Recheck Cond: ((n_concesion = '20673'::numeric) AND ((array_agg(_transacts.id_socio)) @> id_socios))
  • Rows Removed by Index Recheck: 25
  • Filter: (distance < '50'::numeric)
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=139
17. 0.021 6.906 ↓ 0.0 0 1

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

18. 0.143 0.143 ↓ 2.2 246 1

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

  • Index Cond: (n_concesion = '20673'::numeric)
19. 6.742 6.742 ↑ 3.3 301 1

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

  • Index Cond: ((array_agg(_transacts.id_socio)) @> id_socios)
20. 2.034 2.034 ↑ 1.0 1 113

Index Scan using akto_clientes_part_id_socio_idx on akto_clientes_particulares cp (cost=0.55..8.46 rows=1 width=113) (actual time=0.018..0.018 rows=1 loops=113)

  • Index Cond: (id_socio = (unnest(e.id_socios)))
Planning time : 2.505 ms
Execution time : 22.327 ms