explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lPph

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 14.116 ↑ 1.0 1 1

Subquery Scan on noo (cost=40,432.65..40,432.67 rows=1 width=28) (actual time=14.115..14.116 rows=1 loops=1)

2. 1.420 14.114 ↑ 1.0 1 1

Aggregate (cost=40,432.65..40,432.66 rows=1 width=24) (actual time=14.114..14.114 rows=1 loops=1)

3. 1.520 12.694 ↑ 1.2 5,262 1

Finalize GroupAggregate (cost=39,517.79..40,318.94 rows=6,498 width=20) (actual time=8.931..12.694 rows=5,262 loops=1)

  • Group Key: subordertable.orderid, subordertable.customerid
4. 4.853 11.174 ↑ 1.0 5,317 1

Gather Merge (cost=39,517.79..40,197.09 rows=5,416 width=24) (actual time=8.925..11.174 rows=5,317 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 0.626 6.321 ↑ 1.5 1,772 3 / 3

Partial GroupAggregate (cost=38,517.77..38,571.93 rows=2,708 width=24) (actual time=5.546..6.321 rows=1,772 loops=3)

  • Group Key: subordertable.orderid, subordertable.customerid
6. 0.803 5.695 ↑ 1.4 1,873 3 / 3

Sort (cost=38,517.77..38,524.54 rows=2,708 width=24) (actual time=5.540..5.695 rows=1,873 loops=3)

  • Sort Key: subordertable.orderid, subordertable.customerid
  • Sort Method: quicksort Memory: 327kB
  • Worker 0: Sort Method: quicksort Memory: 161kB
  • Worker 1: Sort Method: quicksort Memory: 144kB
7. 1.102 4.892 ↑ 1.4 1,873 3 / 3

Nested Loop Left Join (cost=163.50..38,363.37 rows=2,708 width=24) (actual time=0.718..4.892 rows=1,873 loops=3)

  • Filter: ((subordertable.subordermodeofpayment <> 'onlinepayment'::text) OR (paymenttable.paymentgatewaystatus = 'success'::text))
  • Rows Removed by Filter: 109
8. 3.343 3.790 ↑ 1.5 1,982 3 / 3

Parallel Bitmap Heap Scan on subordertable (cost=163.07..25,762.62 rows=3,031 width=38) (actual time=0.714..3.790 rows=1,982 loops=3)

  • Recheck Cond: ((storeid = 6,511) OR (parentstoreid = 6,511))
  • Heap Blocks: exact=2,691
9. 0.000 0.447 ↓ 0.0 0 1 / 3

BitmapOr (cost=163.07..163.07 rows=7,276 width=0) (actual time=1.342..1.342 rows=0 loops=1)

10. 0.444 0.444 ↑ 1.1 5,947 1 / 3

Bitmap Index Scan on idx_storeid_subordertable (cost=0.00..141.73 rows=6,573 width=0) (actual time=1.333..1.333 rows=5,947 loops=1)

  • Index Cond: (storeid = 6,511)
11. 0.003 0.003 ↓ 0.0 0 1 / 3

Bitmap Index Scan on idx_parentstoreid_subordertable (cost=0.00..17.71 rows=703 width=0) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: (parentstoreid = 6,511)
12. 0.000 0.000 ↓ 0.0 0 5,947 / 3

Index Scan using paymenttable_pkey on paymenttable (cost=0.42..4.14 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=5,947)

  • Index Cond: (subordertable.suborderpaymentid = paymentid)
Planning time : 0.254 ms
Execution time : 14.337 ms