explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ur0W : test

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

Limit (cost=1,140,615.08..1,140,615.09 rows=1 width=36) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=1,140,615.08..1,140,615.09 rows=1 width=36) (actual rows= loops=)

  • Sort Key: tmp."Order Name", tmp.order_discr
3. 0.000 0.000 ↓ 0.0

Subquery Scan on tmp (cost=1,140,612.06..1,140,615.07 rows=1 width=36) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

HashAggregate (cost=1,140,612.06..1,140,615.06 rows=1 width=40) (actual rows= loops=)

  • Group Key: "*SELECT* 1".name
  • Filter: (CASE WHEN (GROUPING("*SELECT* 1".name) = 0) THEN 1 ELSE 0 END = 1)
5. 0.000 0.000 ↓ 0.0

Append (cost=602,825.87..1,109,464.79 rows=2,076,485 width=1,223) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Result (cost=602,825.87..1,099,082.33 rows=2,076,484 width=1,223) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Append (cost=602,825.87..1,067,935.07 rows=2,076,484 width=1,215) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Result (cost=602,825.87..1,057,552.65 rows=2,076,483 width=1,215) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Append (cost=602,825.87..1,031,596.61 rows=2,076,483 width=1,211) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1 (cost=602,825.87..1,021,214.19 rows=2,076,482 width=1,006) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Gather (cost=602,825.87..995,258.17 rows=2,076,482 width=1,002) (actual rows= loops=)

  • Workers Planned: 2
12. 0.000 0.000 ↓ 0.0

Parallel Hash Join (cost=601,825.87..786,609.97 rows=865,201 width=1,002) (actual rows= loops=)

  • Hash Cond: (o_3.id = l.shopify_order_id)
13. 0.000 0.000 ↓ 0.0

Parallel Append (cost=662.55..95,633.10 rows=44,680 width=673) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on shopify_orders_2019_06_09 o_3 (cost=1,000.34..54,760.13 rows=19,135 width=779) (actual rows= loops=)

  • Recheck Cond: (shop_id = 80)
  • Filter: ((created_at >= '2019-01-01 00:00:00'::timestamp without time zone) AND (created_at <= '2019-09-28 22:59:59'::timestamp without time zone))
15. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on shopify_orders_2019_06_09_on_shop_id (cost=0.00..988.86 rows=45,924 width=0) (actual rows= loops=)

  • Index Cond: (shop_id = 80)
16. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on shopify_orders_2019_03_06 o_2 (cost=662.55..19,743.84 rows=12,588 width=589) (actual rows= loops=)

  • Recheck Cond: (shop_id = 80)
  • Filter: ((created_at >= '2019-01-01 00:00:00'::timestamp without time zone) AND (created_at <= '2019-09-28 22:59:59'::timestamp without time zone))
17. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on shopify_orders_2019_03_06_on_shop_id (cost=0.00..655.00 rows=30,210 width=0) (actual rows= loops=)

  • Index Cond: (shop_id = 80)
18. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on shopify_orders_2019_09_12 o_4 (cost=399.61..9,717.22 rows=7,483 width=610) (actual rows= loops=)

  • Recheck Cond: (shop_id = 80)
  • Filter: ((created_at >= '2019-01-01 00:00:00'::timestamp without time zone) AND (created_at <= '2019-09-28 22:59:59'::timestamp without time zone))
19. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on shopify_orders_2019_09_12_on_shop_id (cost=0.00..395.12 rows=17,960 width=0) (actual rows= loops=)

  • Index Cond: (shop_id = 80)
20. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on shopify_orders_2019_01_03 o_1 (cost=290.22..11,188.52 rows=5,473 width=584) (actual rows= loops=)

  • Recheck Cond: (shop_id = 80)
  • Filter: ((created_at >= '2019-01-01 00:00:00'::timestamp without time zone) AND (created_at <= '2019-09-28 22:59:59'::timestamp without time zone))
21. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on shopify_orders_2019_01_03_on_shop_id (cost=0.00..286.94 rows=13,136 width=0) (actual rows= loops=)

  • Index Cond: (shop_id = 80)
22. 0.000 0.000 ↓ 0.0

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

  • Filter: ((created_at >= '2019-01-01 00:00:00'::timestamp without time zone) AND (created_at <= '2019-09-28 22:59:59'::timestamp without time zone) AND (shop_id = 80))
23. 0.000 0.000 ↓ 0.0

Parallel Hash (cost=497,632.81..497,632.81 rows=2,217,881 width=254) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on shopify_line_items l (cost=0.00..497,632.81 rows=2,217,881 width=254) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

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

26. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.00 rows=0 width=1,128) (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,191) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

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

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

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

30. 0.000 0.000 ↓ 0.0

HashAggregate (cost=0.00..0.01 rows=1 width=1,187) (actual rows= loops=)

  • Group Key: id
31. 0.000 0.000 ↓ 0.0

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

  • One-Time Filter: false