explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Fq7x : Optimization for: Optimization for: plan #Q7A9; plan #e2K5

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.013 39.157 ↑ 1.0 25 1

Limit (cost=8,601.34..9,318.06 rows=25 width=1,697) (actual time=34.926..39.157 rows=25 loops=1)

2. 0.382 39.144 ↑ 27.1 325 1

Nested Loop (cost=0.71..252,945.08 rows=8,823 width=1,697) (actual time=0.054..39.144 rows=325 loops=1)

3. 38.437 38.437 ↑ 34.8 325 1

Index Scan Backward using idx_trn_date_status_product on sw_transactions s (cost=0.57..251,150.98 rows=11,305 width=1,619) (actual time=0.042..38.437 rows=325 loops=1)

  • Index Cond: ((trn_created_at >= '2019-09-14 00:00:00-03'::timestamp with time zone) AND (trn_created_at <= '2019-09-16 23:59:59-03'::timestamp with time zone) AND ((trn_psp_response_cod)::text = '0'::text))
  • Filter: ((trn_psp_merchant_id)::text = ANY ('{lan_aero2000,lan_arg_bbva,lan_arg_esp,lan_chile,lan_chile_bbva,lan_chile_esp,lan_ecuador,lan_ecuador_p,lan_ecu_esp,lan_peru,lan_peru_esp,lan_peru_p,lan_tours_esp,lan_tours,lan_tours_p,lan}'::text[]))
  • Rows Removed by Filter: 24698
4. 0.325 0.325 ↑ 1.0 1 325

Index Scan using idx_pro_type_productid on sw_products s2 (cost=0.14..0.16 rows=1 width=78) (actual time=0.001..0.001 rows=1 loops=325)

  • Index Cond: (((pro_type)::text = 'pan'::text) AND (sw_products_id = s.trn_product))