explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wXGN

Settings
# exclusive inclusive rows x rows loops node
1. 0.054 8,732.858 ↓ 21.0 21 1

Nested Loop Left Join (cost=15,707.50..33,108.45 rows=1 width=500) (actual time=2,353.310..8,732.858 rows=21 loops=1)

2. 0.057 8,721.128 ↓ 21.0 21 1

Nested Loop Left Join (cost=15,707.07..33,107.97 rows=1 width=262) (actual time=2,353.298..8,721.128 rows=21 loops=1)

3. 15.010 8,706.392 ↓ 21.0 21 1

Nested Loop Left Join (cost=15,706.51..33,102.02 rows=1 width=157) (actual time=2,352.220..8,706.392 rows=21 loops=1)

  • Join Filter: (customer.id = subscription.customer_id)
  • Rows Removed by Join Filter: 66843
4. 14.893 6,678.070 ↓ 21.0 21 1

Nested Loop Left Join (cost=12,484.61..29,856.80 rows=1 width=153) (actual time=456.509..6,678.070 rows=21 loops=1)

  • Join Filter: (customer.id = "order".customer_id)
  • Rows Removed by Join Filter: 69447
5. 0.061 6,517.416 ↓ 21.0 21 1

Nested Loop (cost=1.42..17,366.98 rows=1 width=145) (actual time=329.575..6,517.416 rows=21 loops=1)

6. 0.913 6,489.488 ↓ 21.0 21 1

Nested Loop (cost=0.99..17,361.77 rows=1 width=145) (actual time=328.428..6,489.488 rows=21 loops=1)

7. 6,239.878 6,239.878 ↓ 4.2 453 1

Index Scan using shipment_store_idx on shipment (cost=0.56..16,456.55 rows=107 width=16) (actual time=310.586..6,239.878 rows=453 loops=1)

  • Index Cond: (store_id = 235052271)
  • Filter: ((shipped_at >= '2019-01-01 00:00:00'::timestamp without time zone) AND (shipped_at <= '2019-02-01 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 16897
8. 248.697 248.697 ↓ 0.0 0 453

Index Scan using feedback_response_shipment_id_idx on feedback_response (cost=0.43..8.45 rows=1 width=137) (actual time=0.545..0.549 rows=0 loops=453)

  • Index Cond: (shipment_id = shipment.id)
  • Filter: (rating IS NOT NULL)
  • Rows Removed by Filter: 1
9. 27.867 27.867 ↑ 1.0 1 21

Index Only Scan using customer_pkey on customer (cost=0.43..5.20 rows=1 width=8) (actual time=1.325..1.327 rows=1 loops=21)

  • Index Cond: (id = shipment.customer_id)
  • Heap Fetches: 15
10. 28.856 145.761 ↓ 16.2 3,308 21

HashAggregate (cost=12,483.19..12,485.23 rows=204 width=16) (actual time=6.002..6.941 rows=3,308 loops=21)

  • Group Key: "order".customer_id
11. 116.905 116.905 ↓ 3.9 13,720 1

Index Scan using ix_order_store_id on "order" (cost=0.56..12,465.48 rows=3,542 width=16) (actual time=2.310..116.905 rows=13,720 loops=1)

  • Index Cond: (store_id = 235052271)
12. 105.252 2,013.312 ↓ 9.1 3,184 21

GroupAggregate (cost=3,221.89..3,237.39 rows=348 width=18) (actual time=90.061..95.872 rows=3,184 loops=21)

  • Group Key: subscription.customer_id
13. 21.084 1,908.060 ↓ 4.2 3,412 21

Sort (cost=3,221.89..3,223.95 rows=822 width=18) (actual time=90.048..90.860 rows=3,412 loops=21)

  • Sort Key: subscription.customer_id
  • Sort Method: quicksort Memory: 363kB
14. 1,861.529 1,886.976 ↓ 4.2 3,412 1

Bitmap Heap Scan on subscription (cost=78.93..3,182.10 rows=822 width=18) (actual time=26.472..1,886.976 rows=3,412 loops=1)

  • Recheck Cond: (store_id = 235052271)
  • Heap Blocks: exact=3174
15. 25.447 25.447 ↓ 4.2 3,412 1

Bitmap Index Scan on subscription_store_idx (cost=0.00..78.72 rows=822 width=0) (actual time=25.447..25.447 rows=3,412 loops=1)

  • Index Cond: (store_id = 235052271)
16. 14.679 14.679 ↑ 1.0 1 21

Index Scan using shipment_pkey on shipment shipment_1 (cost=0.56..5.94 rows=1 width=105) (actual time=0.698..0.699 rows=1 loops=21)

  • Index Cond: (id = feedback_response.shipment_id)
17. 11.676 11.676 ↑ 1.0 1 21

Index Scan using customer_pkey on customer customer_1 (cost=0.43..0.47 rows=1 width=238) (actual time=0.526..0.556 rows=1 loops=21)

  • Index Cond: (id = shipment_1.customer_id)