explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9tg2

Settings
# exclusive inclusive rows x rows loops node
1. 381.261 34,092.236 ↑ 26.0 578,895 1

Finalize GroupAggregate (cost=14,328,191.84..18,213,822.97 rows=15,070,015 width=43) (actual time=29,491.509..34,092.236 rows=578,895 loops=1)

  • Group Key: trn_num_payments, trn_product, trn_psp_merchant_id, (date_trunc('day'::text, trn_created_at))
2. 0.000 33,710.975 ↑ 9.8 2,513,035 1

Gather Merge (cost=14,328,191.84..17,480,500.66 rows=24,681,258 width=67) (actual time=29,491.470..33,710.975 rows=2,513,035 loops=1)

  • Workers Planned: 9
  • Workers Launched: 9
3. 5,588.200 303,014.600 ↑ 10.9 251,304 10

Partial GroupAggregate (cost=14,327,191.67..14,416,318.43 rows=2,742,362 width=67) (actual time=29,129.588..30,301.460 rows=251,304 loops=10)

  • Group Key: trn_num_payments, trn_product, trn_psp_merchant_id, (date_trunc('day'::text, trn_created_at))
4. 75,147.960 297,426.400 ↑ 1.2 2,305,465 10

Sort (cost=14,327,191.67..14,334,047.57 rows=2,742,362 width=35) (actual time=29,129.534..29,742.640 rows=2,305,465 loops=10)

  • Sort Key: trn_num_payments, trn_product, trn_psp_merchant_id, (date_trunc('day'::text, trn_created_at))
  • Sort Method: external merge Disk: 136480kB
  • Worker 0: Sort Method: external merge Disk: 106392kB
  • Worker 1: Sort Method: external merge Disk: 110464kB
  • Worker 2: Sort Method: external merge Disk: 106504kB
  • Worker 3: Sort Method: external merge Disk: 109520kB
  • Worker 4: Sort Method: external merge Disk: 106864kB
  • Worker 5: Sort Method: external merge Disk: 107720kB
  • Worker 6: Sort Method: external merge Disk: 110352kB
  • Worker 7: Sort Method: external merge Disk: 109632kB
  • Worker 8: Sort Method: external merge Disk: 110168kB
5. 222,278.440 222,278.440 ↑ 1.2 2,305,465 10

Parallel Index Scan using idx_trn_date_status_product on sw_transactions t (cost=0.57..13,990,016.11 rows=2,742,362 width=35) (actual time=0.089..22,227.844 rows=2,305,465 loops=10)

  • Index Cond: ((trn_created_at >= '2018-10-29 00:00:00-03'::timestamp with time zone) AND ((trn_psp_response_cod)::text = '0'::text))
  • Filter: ((trn_operation_id = ANY ('{61,57}'::integer[])) AND (trn_country = 'ARG'::bpchar))
  • Rows Removed by Filter: 2538710
Planning time : 0.376 ms