explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oDE2 : Optimization for: plan #7Z2

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

HashAggregate (cost=5,844.73..5,844.75 rows=1 width=11) (actual rows= loops=)

  • Group Key: country, date_trunc('day'::text, timezone('Asia/Baku'::text, timezone('UTC'::text, ts_created)))
2. 0.000 0.000 ↓ 0.0

Index Scan using countrypartner on anl_orders (cost=0.43..5,844.72 rows=1 width=11) (actual rows= loops=)

  • Index Cond: (((country)::text = 'AZ'::text) AND ((partner_lm)::text = ANY ('{AZ_Crowd_Baku_A,CIS_AZ__Gabala_A,AZ_Crowd_Ganja_A,AZ_Crowd_Jalilabad_A,AZ_Crowd_Lankaran_A,AZ_Crowd_Masallı_A,CIS_AZ__Mingachevir_A,CIS_AZ__Quba_A,CIS_AZ__Shaki_A,CIS_AZ__Shirvan_A,CIS_AZ__Yevlakh_A,"AZ Почта MPAY",UNASSIGNED_AZ,"AZ Baku Azom"}'::text[])) AND ((partner_lm)::text = ANY ('{AZ_Crowd_Baku_A,CIS_AZ__Gabala_A,AZ_Crowd_Ganja_A,AZ_Crowd_Jalilabad_A,AZ_Crowd_Lankaran_A,AZ_Crowd_Masallı_A,CIS_AZ__Mingachevir_A,CIS_AZ__Quba_A,CIS_AZ__Shaki_A,CIS_AZ__Shirvan_A,CIS_AZ__Yevlakh_A,"AZ Почта MPAY",UNASSIGNED_AZ,"AZ Baku Azom"}'::text[])) AND ((partner_lm)::text = ANY ('{AZ_Crowd_Baku_A,CIS_AZ__Gabala_A,AZ_Crowd_Ganja_A,AZ_Crowd_Jalilabad_A,AZ_Crowd_Lankaran_A,AZ_Crowd_Masallı_A,CIS_AZ__Mingachevir_A,CIS_AZ__Quba_A,CIS_AZ__Shaki_A,CIS_AZ__Shirvan_A,CIS_AZ__Yevlakh_A,"AZ Почта MPAY",UNASSIGNED_AZ,"AZ Baku Azom"}'::text[])))
  • Filter: (((state)::text = ANY ('{RETURNED,CANCELLED}'::text[])) AND ((client_id)::text = 'MPAY'::text) AND (((status)::text <> 'ORDER_CANCELLED'::text) OR ((sub_status)::text <> 'BY_CLIENT'::text)) AND (timezone('Asia/Baku'::text, timezone('UTC'::text, ts_created)) >= '2019-03-01 00:00:00'::timestamp without time zone) AND (timezone('Asia/Baku'::text, timezone('UTC'::text, ts_created)) <= '2019-03-31 23:59:59'::timestamp without time zone))