explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uVKC : TEst

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

GroupAggregate (cost=4,774,512.77..7,015,185.56 rows=853,041 width=204) (actual rows= loops=)

  • Group Key: sv.email, sv.number, (order_month(sv.id)), (to_char(sv.created_at, 'MM-DD-YYYY'::text)), (order_day(sv.id)), sv.name
  • Group Key: sv.email, sv.number, (order_month(sv.id)), (to_char(sv.created_at, 'MM-DD-YYYY'::text)), (order_day(sv.id))
  • Group Key: sv.email, sv.number, (order_month(sv.id)), (to_char(sv.created_at, 'MM-DD-YYYY'::text))
  • Group Key: sv.email, sv.number, (order_month(sv.id))
  • Group Key: sv.email, sv.number
  • Group Key: sv.email
  • Group Key: ()
2. 0.000 0.000 ↓ 0.0

Sort (cost=4,774,512.77..4,779,593.03 rows=2,032,103 width=164) (actual rows= loops=)

  • Sort Key: sv.email, sv.number, (order_month(sv.id)), (to_char(sv.created_at, 'MM-DD-YYYY'::text)), (order_day(sv.id)), sv.name
3. 0.000 0.000 ↓ 0.0

Subquery Scan on sv (cost=0.00..4,228,207.83 rows=2,032,103 width=164) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Append (cost=0.00..3,186,755.04 rows=2,032,103 width=1,223) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Result (cost=0.00..3,176,593.50 rows=2,032,102 width=1,223) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Append (cost=0.00..3,146,111.97 rows=2,032,102 width=1,215) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Result (cost=0.00..3,135,951.45 rows=2,032,101 width=1,215) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Append (cost=0.00..3,110,550.19 rows=2,032,101 width=1,211) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1 (cost=0.00..3,100,389.68 rows=2,032,100 width=877) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..3,074,988.43 rows=2,032,100 width=873) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Append (cost=0.00..1,002.03 rows=1,746 width=550) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Seq Scan on shopify_orders o (cost=0.00..0.00 rows=1 width=779) (actual rows= loops=)

  • Filter: ((created_at >= '2019-01-01 18:30:00'::timestamp without time zone) AND (created_at <= '2019-02-01 06:18:05.33'::timestamp without time zone) AND (shop_id = 5))
13. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on shopify_orders_2019_01_06 o_1 (cost=53.43..976.67 rows=1,743 width=550) (actual rows= loops=)

  • Recheck Cond: ((created_at >= '2019-01-01 18:30:00'::timestamp without time zone) AND (created_at <= '2019-02-01 06:18:05.33'::timestamp without time zone))
  • Filter: (shop_id = 5)
14. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on shopify_orders_2019_01_06_created_at (cost=0.00..52.99 rows=2,071 width=0) (actual rows= loops=)

  • Index Cond: ((created_at >= '2019-01-01 18:30:00'::timestamp without time zone) AND (created_at <= '2019-02-01 06:18:05.33'::timestamp without time zone))
15. 0.000 0.000 ↓ 0.0

Index Scan using shopify_orders_2018_06_12_created_at on shopify_orders_2018_06_12 o_2 (cost=0.29..8.31 rows=1 width=542) (actual rows= loops=)

  • Index Cond: ((created_at >= '2019-01-01 18:30:00'::timestamp without time zone) AND (created_at <= '2019-02-01 06:18:05.33'::timestamp without time zone))
  • Filter: (shop_id = 5)
16. 0.000 0.000 ↓ 0.0

Index Scan using shopify_orders_2017_06_12_created_at on shopify_orders_2017_06_12 o_3 (cost=0.29..8.31 rows=1 width=563) (actual rows= loops=)

  • Index Cond: ((created_at >= '2019-01-01 18:30:00'::timestamp without time zone) AND (created_at <= '2019-02-01 06:18:05.33'::timestamp without time zone))
  • Filter: (shop_id = 5)
17. 0.000 0.000 ↓ 0.0

Append (cost=0.00..14.72 rows=8 width=200) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Seq Scan on shopify_line_items l (cost=0.00..0.00 rows=1 width=304) (actual rows= loops=)

  • Filter: (o.id = shopify_order_id)
19. 0.000 0.000 ↓ 0.0

Index Scan using shopify_line_items_2019_01_06_on_shopify_order_id on shopify_line_items_2019_01_06 l_1 (cost=0.29..1.56 rows=1 width=207) (actual rows= loops=)

  • Index Cond: (shopify_order_id = o.id)
20. 0.000 0.000 ↓ 0.0

Index Scan using shopify_line_items_2019_06_12_on_shopify_order_id on shopify_line_items_2019_06_12 l_2 (cost=0.29..3.03 rows=2 width=184) (actual rows= loops=)

  • Index Cond: (shopify_order_id = o.id)
21. 0.000 0.000 ↓ 0.0

Index Scan using shopify_line_items_2018_01_06_on_shopify_order_id on shopify_line_items_2018_01_06 l_3 (cost=0.29..4.05 rows=1 width=206) (actual rows= loops=)

  • Index Cond: (shopify_order_id = o.id)
22. 0.000 0.000 ↓ 0.0

Index Scan using shopify_line_items_2018_06_12_on_shopify_order_id on shopify_line_items_2018_06_12 l_4 (cost=0.29..3.07 rows=1 width=204) (actual rows= loops=)

  • Index Cond: (shopify_order_id = o.id)
23. 0.000 0.000 ↓ 0.0

Index Scan using shopify_line_items_2017_01_06_on_shopify_order_id on shopify_line_items_2017_01_06 l_5 (cost=0.14..0.19 rows=1 width=304) (actual rows= loops=)

  • Index Cond: (shopify_order_id = o.id)
24. 0.000 0.000 ↓ 0.0

Index Scan using shopify_line_items_2017_06_12_on_shopify_order_id on shopify_line_items_2017_06_12 l_6 (cost=0.29..2.79 rows=1 width=191) (actual rows= loops=)

  • Index Cond: (shopify_order_id = o.id)
25. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2 (cost=0.00..0.00 rows=1 width=1,169) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.00 rows=0 width=1,165) (actual rows= loops=)

  • One-Time Filter: false
27. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 3 (cost=0.00..0.01 rows=1 width=1,190) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.00 rows=0 width=1,182) (actual rows= loops=)

  • One-Time Filter: false
29. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 4 (cost=0.00..1.03 rows=1 width=1,198) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

HashAggregate (cost=0.00..1.01 rows=1 width=1,186) (actual rows= loops=)

  • Group Key: id, created_at, name, number, order_number, shop_id
31. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.00 rows=0 width=47) (actual rows= loops=)

  • One-Time Filter: false