explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qSQ2

Settings
# exclusive inclusive rows x rows loops node
1. 390.324 16,778.240 ↓ 20.6 617,604 1

Finalize GroupAggregate (cost=1,764,384.07..1,773,629.62 rows=29,984 width=104) (actual time=15,698.405..16,778.240 rows=617,604 loops=1)

  • Group Key: subordertable.storeid
2. 636.130 16,387.916 ↓ 17.6 1,056,116 1

Gather Merge (cost=1,764,384.07..1,771,380.82 rows=59,968 width=104) (actual time=15,698.391..16,387.916 rows=1,056,116 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 248.359 15,751.786 ↓ 11.7 352,039 3 / 3

Sort (cost=1,763,384.05..1,763,459.01 rows=29,984 width=104) (actual time=15,682.044..15,751.786 rows=352,039 loops=3)

  • Sort Key: subordertable.storeid
  • Sort Method: quicksort Memory: 61,587kB
  • Worker 0: Sort Method: quicksort Memory: 61,844kB
  • Worker 1: Sort Method: quicksort Memory: 61,951kB
4. 6,689.034 15,503.427 ↓ 11.7 352,039 3 / 3

Partial HashAggregate (cost=1,760,854.61..1,761,154.45 rows=29,984 width=104) (actual time=15,348.553..15,503.427 rows=352,039 loops=3)

  • Group Key: subordertable.storeid
5. 1,386.748 8,814.393 ↑ 1.2 2,132,840 3 / 3

Parallel Hash Left Join (cost=1,095,099.66..1,224,275.75 rows=2,525,077 width=42) (actual time=4,581.038..8,814.393 rows=2,132,840 loops=3)

  • Hash Cond: (subordertable.subordershipmentid = shipmenttable.shipmentid)
6. 863.295 5,956.493 ↑ 1.2 2,132,840 3 / 3

Parallel Hash Left Join (cost=818,982.68..941,530.44 rows=2,525,077 width=38) (actual time=3,098.805..5,956.493 rows=2,132,840 loops=3)

  • Hash Cond: (subordertable.suborderpaymentid = paymenttable.paymentid)
  • Filter: ((subordertable.subordermodeofpayment = 'cod'::text) OR (paymenttable.paymentgatewaystatus = 'success'::text))
  • Rows Removed by Filter: 207,401
7. 1,707.240 4,912.291 ↑ 1.2 2,340,240 3 / 3

Parallel Hash Join (cost=794,703.37..909,572.74 rows=2,925,099 width=38) (actual time=2,915.879..4,912.291 rows=2,340,240 loops=3)

  • Hash Cond: (subordertableforresellers.suborderid = subordertable.suborderid)
8. 310.322 310.322 ↑ 1.2 2,340,240 3 / 3

Parallel Seq Scan on subordertableforresellers (cost=0.00..107,190.99 rows=2,925,099 width=8) (actual time=0.007..310.322 rows=2,340,240 loops=3)

9. 1,507.329 2,894.729 ↑ 1.3 3,473,435 3 / 3

Parallel Hash (cost=740,430.94..740,430.94 rows=4,341,794 width=46) (actual time=2,894.729..2,894.729 rows=3,473,435 loops=3)

  • Buckets: 16,777,216 Batches: 1 Memory Usage: 868,128kB
10. 1,387.400 1,387.400 ↑ 1.3 3,473,435 3 / 3

Parallel Seq Scan on subordertable (cost=0.00..740,430.94 rows=4,341,794 width=46) (actual time=0.022..1,387.400 rows=3,473,435 loops=3)

11. 114.597 180.907 ↑ 1.2 381,949 3 / 3

Parallel Hash (cost=18,311.36..18,311.36 rows=477,436 width=16) (actual time=180.907..180.907 rows=381,949 loops=3)

  • Buckets: 2,097,152 Batches: 1 Memory Usage: 70,176kB
12. 66.310 66.310 ↑ 1.2 381,949 3 / 3

Parallel Seq Scan on paymenttable (cost=0.00..18,311.36 rows=477,436 width=16) (actual time=0.018..66.310 rows=381,949 loops=3)

13. 764.353 1,471.152 ↑ 1.2 2,292,644 3 / 3

Parallel Hash (cost=240,294.77..240,294.77 rows=2,865,777 width=20) (actual time=1,471.152..1,471.152 rows=2,292,644 loops=3)

  • Buckets: 8,388,608 Batches: 1 Memory Usage: 455,744kB
14. 706.799 706.799 ↑ 1.2 2,292,644 3 / 3

Parallel Seq Scan on shipmenttable (cost=0.00..240,294.77 rows=2,865,777 width=20) (actual time=0.028..706.799 rows=2,292,644 loops=3)

Planning time : 1.103 ms
Execution time : 17,142.229 ms