explain.depesz.com

PostgreSQL's explain analyze made readable

Result: szjM : test

Settings
# exclusive inclusive rows x rows loops node
1. 0.046 51.439 ↑ 1.2 400 1

Limit (cost=49,454.89..49,456.14 rows=500 width=272) (actual time=51.390..51.439 rows=400 loops=1)

2. 0.471 51.393 ↑ 11.6 900 1

Sort (cost=49,453.64..49,479.81 rows=10,465 width=272) (actual time=51.344..51.393 rows=900 loops=1)

  • Sort Key: (timezone('Europe/London'::text, timezone('utc'::text, sv.created_at)))
  • Sort Method: quicksort Memory: 151kB
3. 5.119 50.922 ↑ 11.6 900 1

Subquery Scan on sv (cost=1,000.43..48,879.86 rows=10,465 width=272) (actual time=3.315..50.922 rows=900 loops=1)

4. 0.093 45.803 ↑ 11.6 900 1

Append (cost=1,000.43..48,356.61 rows=10,465 width=1,223) (actual time=3.043..45.803 rows=900 loops=1)

5. 0.490 36.316 ↑ 22.5 457 1

Result (cost=1,000.43..43,214.76 rows=10,265 width=1,223) (actual time=3.042..36.316 rows=457 loops=1)

6. 0.000 35.826 ↑ 22.5 457 1

Append (cost=1,000.43..43,060.78 rows=10,265 width=1,215) (actual time=3.039..35.826 rows=457 loops=1)

7. 13.304 25.987 ↑ 21.9 457 1

Gather (cost=1,000.43..35,989.83 rows=10,006 width=1,215) (actual time=3.039..25.987 rows=457 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
8. 0.070 12.683 ↑ 65.4 152 3 / 3

Result (cost=0.43..34,088.51 rows=9,944 width=1,215) (actual time=1.267..12.683 rows=152 loops=3)

9. 0.019 12.613 ↑ 65.4 152 3 / 3

Parallel Append (cost=0.43..33,964.21 rows=9,944 width=1,211) (actual time=1.263..12.613 rows=152 loops=3)

10. 0.071 1.416 ↑ 65.3 150 3 / 3

Subquery Scan on *SELECT* 1 (cost=0.43..19,309.29 rows=9,794 width=917) (actual time=0.632..1.416 rows=150 loops=3)

11. 0.125 1.345 ↑ 27.2 150 3 / 3

Nested Loop (cost=0.43..19,186.86 rows=4,081 width=913) (actual time=0.628..1.345 rows=150 loops=3)

12. 0.018 0.770 ↑ 1.4 150 3 / 3

Parallel Append (cost=0.00..2,104.41 rows=214 width=584) (actual time=0.609..0.770 rows=150 loops=3)

13. 0.176 0.752 ↑ 2.0 150 3 / 3

Parallel Bitmap Heap Scan on shopify_orders_2019_01_03 o_1 (cost=429.29..2,103.34 rows=301 width=584) (actual time=0.608..0.752 rows=150 loops=3)

  • Recheck Cond: ((created_at >= '2019-01-01 00:00:00'::timestamp without time zone) AND (created_at <= '2019-01-02 23:59:59'::timestamp without time zone) AND (shop_id = 80))
  • Heap Blocks: exact=1
14. 0.024 0.576 ↓ 0.0 0 1 / 3

BitmapAnd (cost=429.29..429.29 rows=512 width=0) (actual time=1.729..1.729 rows=0 loops=1)

15. 0.244 0.244 ↓ 1.0 5,787 1 / 3

Bitmap Index Scan on shopify_orders_2019_01_03_created_at (cost=0.00..141.84 rows=5,742 width=0) (actual time=0.732..0.732 rows=5,787 loops=1)

  • Index Cond: ((created_at >= '2019-01-01 00:00:00'::timestamp without time zone) AND (created_at <= '2019-01-02 23:59:59'::timestamp without time zone))
16. 0.308 0.308 ↑ 1.0 12,795 1 / 3

Bitmap Index Scan on shopify_orders_2019_01_03_on_shop_id (cost=0.00..286.94 rows=13,136 width=0) (actual time=0.924..0.925 rows=12,795 loops=1)

  • Index Cond: (shop_id = 80)
17. 0.000 0.000 ↓ 0.0 0 1 / 3

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

  • Filter: ((created_at >= '2019-01-01 00:00:00'::timestamp without time zone) AND (created_at <= '2019-01-02 23:59:59'::timestamp without time zone) AND (shop_id = 80))
18. 0.450 0.450 ↑ 19.0 1 450 / 3

Index Scan using index_shopify_line_items_on_shopify_order_id on shopify_line_items l (cost=0.43..79.59 rows=19 width=253) (actual time=0.002..0.003 rows=1 loops=450)

  • Index Cond: (shopify_order_id = o_1.id)
19. 0.006 11.178 ↑ 70.7 3 2 / 3

Subquery Scan on *SELECT* 2 (cost=0.43..14,605.21 rows=212 width=1,136) (actual time=1.006..16.767 rows=3 loops=2)

20. 0.114 11.172 ↑ 41.7 3 2 / 3

Nested Loop (cost=0.43..14,602.03 rows=125 width=1,128) (actual time=1.000..16.758 rows=3 loops=2)

21. 0.055 8.308 ↑ 1.5 165 2 / 3

Nested Loop (cost=0.43..5,634.61 rows=243 width=185) (actual time=0.319..12.462 rows=165 loops=2)

22. 7.813 7.813 ↑ 1.5 165 2 / 3

Parallel Seq Scan on shopify_refund_line_items rl (cost=0.00..3,583.62 rows=243 width=44) (actual time=0.302..11.720 rows=165 loops=2)

  • Filter: ((created_at >= '2019-01-01 00:00:00'::timestamp without time zone) AND (created_at <= '2019-01-02 23:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 58,588
23. 0.440 0.440 ↑ 1.0 1 330 / 3

Index Scan using shopify_line_items_pkey on shopify_line_items l_1 (cost=0.43..8.44 rows=1 width=149) (actual time=0.004..0.004 rows=1 loops=330)

  • Index Cond: (id = rl.shopify_line_item_id)
24. 0.550 2.750 ↓ 0.0 0 330 / 3

Append (cost=0.00..36.77 rows=13 width=32) (actual time=0.024..0.025 rows=0 loops=330)

25. 0.000 0.000 ↓ 0.0 0 330 / 3

Seq Scan on shopify_orders o_2 (cost=0.00..0.00 rows=1 width=32) (actual time=0.000..0.000 rows=0 loops=330)

  • Filter: ((shop_id = 80) AND (l_1.shopify_order_id = id))
26. 0.330 0.330 ↓ 0.0 0 330 / 3

Index Scan using shopify_orders_2019_01_03_pkey on shopify_orders_2019_01_03 o_3 (cost=0.42..3.07 rows=1 width=32) (actual time=0.003..0.003 rows=0 loops=330)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (shop_id = 80)
  • Rows Removed by Filter: 0
27. 0.220 0.220 ↓ 0.0 0 330 / 3

Index Scan using shopify_orders_2019_03_06_pkey on shopify_orders_2019_03_06 o_4 (cost=0.42..3.08 rows=1 width=32) (actual time=0.002..0.002 rows=0 loops=330)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (shop_id = 80)
28. 0.220 0.220 ↓ 0.0 0 330 / 3

Index Scan using shopify_orders_2019_06_09_pkey on shopify_orders_2019_06_09 o_5 (cost=0.42..3.11 rows=1 width=33) (actual time=0.002..0.002 rows=0 loops=330)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (shop_id = 80)
29. 0.220 0.220 ↓ 0.0 0 330 / 3

Index Scan using shopify_orders_2019_09_12_pkey on shopify_orders_2019_09_12 o_6 (cost=0.42..3.07 rows=1 width=32) (actual time=0.002..0.002 rows=0 loops=330)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (shop_id = 80)
30. 0.110 0.110 ↓ 0.0 0 330 / 3

Index Scan using shopify_orders_2018_01_06_pkey on shopify_orders_2018_01_06 o_7 (cost=0.42..3.10 rows=1 width=32) (actual time=0.001..0.001 rows=0 loops=330)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (shop_id = 80)
31. 0.440 0.440 ↓ 0.0 0 330 / 3

Index Scan using shopify_orders_2018_06_12_pkey on shopify_orders_2018_06_12 o_8 (cost=0.42..3.10 rows=1 width=32) (actual time=0.004..0.004 rows=0 loops=330)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (shop_id = 80)
  • Rows Removed by Filter: 1
32. 0.110 0.110 ↓ 0.0 0 330 / 3

Index Scan using shopify_orders_2017_01_06_pkey on shopify_orders_2017_01_06 o_9 (cost=0.42..3.08 rows=1 width=32) (actual time=0.001..0.001 rows=0 loops=330)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (shop_id = 80)
33. 0.110 0.110 ↓ 0.0 0 330 / 3

Index Scan using shopify_orders_2017_06_12_pkey on shopify_orders_2017_06_12 o_10 (cost=0.42..3.10 rows=1 width=31) (actual time=0.001..0.001 rows=0 loops=330)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (shop_id = 80)
34. 0.110 0.110 ↓ 0.0 0 330 / 3

Index Scan using shopify_orders_2016_01_12_pkey on shopify_orders_2016_01_12 o_11 (cost=0.42..3.08 rows=1 width=32) (actual time=0.001..0.001 rows=0 loops=330)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (shop_id = 80)
35. 0.110 0.110 ↓ 0.0 0 330 / 3

Index Scan using shopify_orders_2015_01_12_pkey on shopify_orders_2015_01_12 o_12 (cost=0.42..3.08 rows=1 width=31) (actual time=0.001..0.001 rows=0 loops=330)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (shop_id = 80)
36. 0.110 0.110 ↓ 0.0 0 330 / 3

Index Scan using shopify_orders_2014_01_12_pkey on shopify_orders_2014_01_12 o_13 (cost=0.29..2.95 rows=1 width=31) (actual time=0.001..0.001 rows=0 loops=330)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (shop_id = 80)
37. 0.110 0.110 ↓ 0.0 0 330 / 3

Index Scan using shopify_orders_2013_pkey on shopify_orders_2013 o_14 (cost=0.28..2.89 rows=1 width=30) (actual time=0.001..0.001 rows=0 loops=330)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (shop_id = 80)
38. 0.000 9.984 ↓ 0.0 0 1

Subquery Scan on *SELECT* 3 (cost=1,000.00..7,019.63 rows=259 width=1,191) (actual time=9.983..9.984 rows=0 loops=1)

39. 3.794 10.024 ↓ 0.0 0 1

Gather (cost=1,000.00..7,015.74 rows=259 width=1,183) (actual time=9.983..10.024 rows=0 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
40. 0.014 6.230 ↓ 0.0 0 2 / 2

Nested Loop (cost=0.00..5,989.84 rows=152 width=1,183) (actual time=6.230..6.230 rows=0 loops=2)

41. 5.376 5.376 ↑ 1.6 28 2 / 2

Parallel Seq Scan on shopify_order_adjustments a (cost=0.00..1,756.15 rows=44 width=56) (actual time=1.321..5.376 rows=28 loops=2)

  • Filter: ((created_at >= '2019-01-01 00:00:00'::timestamp without time zone) AND (created_at <= '2019-01-02 23:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 28,373
42. 0.056 0.840 ↓ 0.0 0 56 / 2

Append (cost=0.00..96.08 rows=13 width=32) (actual time=0.030..0.030 rows=0 loops=56)

43. 0.000 0.000 ↓ 0.0 0 56 / 2

Seq Scan on shopify_orders o_15 (cost=0.00..0.00 rows=1 width=32) (actual time=0.000..0.000 rows=0 loops=56)

  • Filter: ((shop_id = 80) AND (a.shopify_order_id = id))
44. 0.112 0.112 ↓ 0.0 0 56 / 2

Index Scan using shopify_orders_2019_01_03_pkey on shopify_orders_2019_01_03 o_16 (cost=0.42..8.23 rows=1 width=32) (actual time=0.004..0.004 rows=0 loops=56)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (shop_id = 80)
  • Rows Removed by Filter: 0
45. 0.084 0.084 ↓ 0.0 0 56 / 2

Index Scan using shopify_orders_2019_03_06_pkey on shopify_orders_2019_03_06 o_17 (cost=0.42..8.33 rows=1 width=32) (actual time=0.003..0.003 rows=0 loops=56)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (shop_id = 80)
46. 0.056 0.056 ↓ 0.0 0 56 / 2

Index Scan using shopify_orders_2019_06_09_pkey on shopify_orders_2019_06_09 o_18 (cost=0.42..8.39 rows=1 width=33) (actual time=0.002..0.002 rows=0 loops=56)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (shop_id = 80)
47. 0.056 0.056 ↓ 0.0 0 56 / 2

Index Scan using shopify_orders_2019_09_12_pkey on shopify_orders_2019_09_12 o_19 (cost=0.42..8.17 rows=1 width=32) (actual time=0.002..0.002 rows=0 loops=56)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (shop_id = 80)
48. 0.056 0.056 ↓ 0.0 0 56 / 2

Index Scan using shopify_orders_2018_01_06_pkey on shopify_orders_2018_01_06 o_20 (cost=0.42..8.39 rows=1 width=32) (actual time=0.002..0.002 rows=0 loops=56)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (shop_id = 80)
49. 0.140 0.140 ↓ 0.0 0 56 / 2

Index Scan using shopify_orders_2018_06_12_pkey on shopify_orders_2018_06_12 o_21 (cost=0.42..8.39 rows=1 width=32) (actual time=0.005..0.005 rows=0 loops=56)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (shop_id = 80)
  • Rows Removed by Filter: 1
50. 0.056 0.056 ↓ 0.0 0 56 / 2

Index Scan using shopify_orders_2017_01_06_pkey on shopify_orders_2017_01_06 o_22 (cost=0.42..8.23 rows=1 width=32) (actual time=0.002..0.002 rows=0 loops=56)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (shop_id = 80)
51. 0.056 0.056 ↓ 0.0 0 56 / 2

Index Scan using shopify_orders_2017_06_12_pkey on shopify_orders_2017_06_12 o_23 (cost=0.42..8.39 rows=1 width=31) (actual time=0.002..0.002 rows=0 loops=56)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (shop_id = 80)
52. 0.056 0.056 ↓ 0.0 0 56 / 2

Index Scan using shopify_orders_2016_01_12_pkey on shopify_orders_2016_01_12 o_24 (cost=0.42..8.17 rows=1 width=32) (actual time=0.002..0.002 rows=0 loops=56)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (shop_id = 80)
53. 0.056 0.056 ↓ 0.0 0 56 / 2

Index Scan using shopify_orders_2015_01_12_pkey on shopify_orders_2015_01_12 o_25 (cost=0.42..8.23 rows=1 width=31) (actual time=0.002..0.002 rows=0 loops=56)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (shop_id = 80)
54. 0.028 0.028 ↓ 0.0 0 56 / 2

Index Scan using shopify_orders_2014_01_12_pkey on shopify_orders_2014_01_12 o_26 (cost=0.29..7.94 rows=1 width=31) (actual time=0.001..0.001 rows=0 loops=56)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (shop_id = 80)
55. 0.028 0.028 ↓ 0.0 0 56 / 2

Index Scan using shopify_orders_2013_pkey on shopify_orders_2013 o_27 (cost=0.28..5.16 rows=1 width=30) (actual time=0.001..0.001 rows=0 loops=56)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (shop_id = 80)
56. 0.203 9.394 ↓ 2.2 443 1

Subquery Scan on *SELECT* 4 (cost=5,026.03..5,089.53 rows=200 width=1,199) (actual time=8.494..9.394 rows=443 loops=1)

57. 0.292 9.191 ↓ 2.2 443 1

Finalize GroupAggregate (cost=5,026.03..5,086.03 rows=200 width=1,187) (actual time=8.485..9.191 rows=443 loops=1)

  • Group Key: o_29.id
58. 7.296 8.899 ↓ 1.1 443 1

Gather Merge (cost=5,026.03..5,078.03 rows=400 width=80) (actual time=8.464..8.899 rows=443 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
59. 0.080 1.603 ↑ 1.4 148 3 / 3

Partial GroupAggregate (cost=4,026.00..4,031.83 rows=200 width=80) (actual time=1.517..1.603 rows=148 loops=3)

  • Group Key: o_29.id
60. 0.086 1.523 ↑ 1.5 148 3 / 3

Sort (cost=4,026.00..4,026.55 rows=219 width=80) (actual time=1.511..1.523 rows=148 loops=3)

  • Sort Key: o_29.id
  • Sort Method: quicksort Memory: 83kB
  • Worker 0: Sort Method: quicksort Memory: 28kB
  • Worker 1: Sort Method: quicksort Memory: 25kB
61. 0.000 1.437 ↑ 1.5 148 3 / 3

Nested Loop Left Join (cost=0.85..4,017.49 rows=219 width=80) (actual time=0.570..1.437 rows=148 loops=3)

62. 0.156 1.146 ↑ 1.5 148 3 / 3

Nested Loop (cost=0.43..3,902.64 rows=219 width=80) (actual time=0.564..1.146 rows=148 loops=3)

63. 0.017 0.690 ↑ 1.4 150 3 / 3

Parallel Append (cost=0.00..2,104.41 rows=214 width=40) (actual time=0.557..0.690 rows=150 loops=3)

64. 0.131 0.673 ↑ 1.3 225 2 / 3

Parallel Bitmap Heap Scan on shopify_orders_2019_01_03 o_29 (cost=429.29..2,103.34 rows=301 width=40) (actual time=0.835..1.009 rows=225 loops=2)

  • Recheck Cond: ((created_at >= '2019-01-01 00:00:00'::timestamp without time zone) AND (created_at <= '2019-01-02 23:59:59'::timestamp without time zone) AND (shop_id = 80))
  • Heap Blocks: exact=33
65. 0.015 0.542 ↓ 0.0 0 1 / 3

BitmapAnd (cost=429.29..429.29 rows=512 width=0) (actual time=1.625..1.625 rows=0 loops=1)

66. 0.232 0.232 ↓ 1.0 5,787 1 / 3

Bitmap Index Scan on shopify_orders_2019_01_03_created_at (cost=0.00..141.84 rows=5,742 width=0) (actual time=0.695..0.696 rows=5,787 loops=1)

  • Index Cond: ((created_at >= '2019-01-01 00:00:00'::timestamp without time zone) AND (created_at <= '2019-01-02 23:59:59'::timestamp without time zone))
67. 0.295 0.295 ↑ 1.0 12,795 1 / 3

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

  • Index Cond: (shop_id = 80)
68. 0.000 0.000 ↓ 0.0 0 1 / 3

Parallel Seq Scan on shopify_orders o_28 (cost=0.00..0.00 rows=1 width=40) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: ((created_at >= '2019-01-01 00:00:00'::timestamp without time zone) AND (created_at <= '2019-01-02 23:59:59'::timestamp without time zone) AND (shop_id = 80))
69. 0.300 0.300 ↑ 1.0 1 450 / 3

Index Scan using index_shopify_shipping_lines_on_shopify_order_id on shopify_shipping_lines sl (cost=0.43..8.39 rows=1 width=48) (actual time=0.002..0.002 rows=1 loops=450)

  • Index Cond: (shopify_order_id = o_29.id)
70. 0.295 0.295 ↓ 0.0 0 443 / 3

Index Scan using index_shopify_shipping_tax_lines_on_shopify_shipping_line_id on shopify_shipping_tax_lines s (cost=0.42..0.49 rows=3 width=16) (actual time=0.002..0.002 rows=0 loops=443)

  • Index Cond: (sl.id = shopify_shipping_line_id)
Planning time : 9.299 ms
Execution time : 52.715 ms