explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5dx8 : test

Settings
# exclusive inclusive rows x rows loops node
1. 0.074 45,670.834 ↓ 2.5 500 1

Limit (cost=3,007,833.54..3,007,834.04 rows=200 width=292) (actual time=45,670.736..45,670.834 rows=500 loops=1)

2. 32.913 45,670.760 ↓ 2.5 500 1

Sort (cost=3,007,833.54..3,007,834.04 rows=200 width=292) (actual time=45,670.735..45,670.760 rows=500 loops=1)

  • Sort Key: tmp."Order ID", tmp.order_discr
  • Sort Method: top-N heapsort Memory: 95kB
3. 7.813 45,637.847 ↓ 253.6 50,718 1

Subquery Scan on tmp (cost=2,326,543.40..3,007,825.90 rows=200 width=292) (actual time=42,769.632..45,637.847 rows=50,718 loops=1)

4. 2,827.890 45,630.034 ↓ 253.6 50,718 1

GroupAggregate (cost=2,326,543.40..3,007,823.90 rows=200 width=304) (actual time=42,769.630..45,630.034 rows=50,718 loops=1)

  • Group Key: sv.id, sv.name
  • Filter: (CASE WHEN ((GROUPING(sv.id) = 0) AND (GROUPING(sv.name) = 0)) THEN 1 ELSE 0 END = 1)
5. 87.586 42,802.144 ↑ 11.8 102,059 1

Sort (cost=2,326,543.40..2,329,565.08 rows=1,208,672 width=92) (actual time=42,768.681..42,802.144 rows=102,059 loops=1)

  • Sort Key: sv.id, sv.name
  • Sort Method: external merge Disk: 8,216kB
6. 11.915 42,714.558 ↑ 11.8 102,059 1

Subquery Scan on sv (cost=769,920.22..2,080,495.36 rows=1,208,672 width=92) (actual time=35,247.063..42,714.558 rows=102,059 loops=1)

7. 8.258 42,702.643 ↑ 11.8 102,059 1

Append (cost=769,920.22..2,068,408.64 rows=1,208,672 width=1,223) (actual time=35,247.062..42,702.643 rows=102,059 loops=1)

8. 15.321 37,587.488 ↑ 23.4 51,615 1

Result (cost=769,920.22..1,770,145.19 rows=1,208,472 width=1,223) (actual time=35,247.061..37,587.488 rows=51,615 loops=1)

9. 4.350 37,572.167 ↑ 23.4 51,615 1

Append (cost=769,920.22..1,752,018.11 rows=1,208,472 width=1,215) (actual time=35,247.058..37,572.167 rows=51,615 loops=1)

10. 15.449 37,443.591 ↑ 21.5 51,601 1

Result (cost=769,920.22..1,580,891.11 rows=1,109,245 width=1,215) (actual time=35,247.058..37,443.591 rows=51,601 loops=1)

11. 4.267 37,428.142 ↑ 21.5 51,601 1

Append (cost=769,920.22..1,567,025.54 rows=1,109,245 width=1,211) (actual time=35,247.053..37,428.142 rows=51,601 loops=1)

12. 16.159 37,177.652 ↑ 21.2 51,468 1

Subquery Scan on *SELECT* 1 (cost=769,920.22..1,137,759.91 rows=1,090,898 width=1,055) (actual time=35,247.053..37,177.652 rows=51,468 loops=1)

13. 1,865.962 37,161.493 ↑ 21.2 51,468 1

Hash Join (cost=769,920.22..1,124,123.68 rows=1,090,898 width=1,051) (actual time=35,247.049..37,161.493 rows=51,468 loops=1)

  • Hash Cond: (o.id = l.shopify_order_id)
14. 4.619 59.464 ↑ 1.1 50,710 1

Append (cost=0.00..65,795.33 rows=57,138 width=722) (actual time=4.030..59.464 rows=50,710 loops=1)

15. 0.002 0.002 ↓ 0.0 0 1

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

  • Filter: ((created_at >= '2019-06-29 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-27 22:59:59'::timestamp without time zone) AND (shop_id = 80))
16. 37.170 40.163 ↑ 1.2 32,764 1

Bitmap Heap Scan on shopify_orders_2019_06_09 o_1 (cost=1,035.87..55,702.57 rows=38,951 width=774) (actual time=4.027..40.163 rows=32,764 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Filter: ((created_at >= '2019-06-29 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-27 22:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 12,236
  • Heap Blocks: exact=8,419
17. 2.993 2.993 ↑ 1.1 45,000 1

Bitmap Index Scan on shopify_orders_2019_06_09_on_shop_id (cost=0.00..1,026.13 rows=47,694 width=0) (actual time=2.993..2.993 rows=45,000 loops=1)

  • Index Cond: (shop_id = 80)
18. 13.137 14.680 ↑ 1.0 17,946 1

Bitmap Heap Scan on shopify_orders_2019_09_12 o_2 (cost=401.49..9,807.06 rows=18,186 width=611) (actual time=1.818..14.680 rows=17,946 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Filter: ((created_at >= '2019-06-29 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-27 22:59:59'::timestamp without time zone))
  • Heap Blocks: exact=2,093
19. 1.543 1.543 ↑ 1.0 17,946 1

Bitmap Index Scan on shopify_orders_2019_09_12_on_shop_id (cost=0.00..396.95 rows=18,204 width=0) (actual time=1.543..1.543 rows=17,946 loops=1)

  • Index Cond: (shop_id = 80)
20. 4,333.533 35,236.067 ↓ 1.0 5,335,850 1

Hash (cost=527,406.54..527,406.54 rows=5,195,254 width=253) (actual time=35,236.067..35,236.067 rows=5,335,850 loops=1)

  • Buckets: 16,384 Batches: 512 Memory Usage: 3,145kB
21. 30,902.534 30,902.534 ↓ 1.0 5,335,850 1

Seq Scan on shopify_line_items l (cost=0.00..527,406.54 rows=5,195,254 width=253) (actual time=3.117..30,902.534 rows=5,335,850 loops=1)

22. 0.078 246.223 ↑ 137.9 133 1

Subquery Scan on *SELECT* 2 (cost=260,737.34..423,719.41 rows=18,347 width=1,136) (actual time=139.387..246.223 rows=133 loops=1)

23. 38.302 246.145 ↑ 137.9 133 1

Hash Join (cost=260,737.34..423,444.21 rows=18,347 width=1,128) (actual time=139.382..246.145 rows=133 loops=1)

  • Hash Cond: (o_3.id = l_1.shopify_order_id)
24. 9.487 90.086 ↑ 1.0 139,332 1

Append (cost=0.00..157,583.67 rows=142,922 width=32) (actual time=0.675..90.086 rows=139,332 loops=1)

25. 0.010 0.010 ↓ 0.0 0 1

Seq Scan on shopify_orders o_3 (cost=0.00..0.00 rows=1 width=32) (actual time=0.010..0.010 rows=0 loops=1)

  • Filter: (shop_id = 80)
26. 5.984 6.532 ↑ 1.0 12,795 1

Bitmap Heap Scan on shopify_orders_2019_01_03 o_4 (cost=290.22..11,256.94 rows=13,136 width=32) (actual time=0.664..6.532 rows=12,795 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=1,144
27. 0.548 0.548 ↑ 1.0 12,795 1

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.548..0.548 rows=12,795 loops=1)

  • Index Cond: (shop_id = 80)
28. 14.109 15.367 ↑ 1.0 29,648 1

Bitmap Heap Scan on shopify_orders_2019_03_06 o_5 (cost=663.07..19,896.79 rows=30,277 width=32) (actual time=1.578..15.367 rows=29,648 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=3,028
29. 1.258 1.258 ↑ 1.0 29,648 1

Bitmap Index Scan on shopify_orders_2019_03_06_on_shop_id (cost=0.00..655.50 rows=30,277 width=0) (actual time=1.258..1.258 rows=29,648 loops=1)

  • Index Cond: (shop_id = 80)
30. 26.830 29.232 ↑ 1.1 45,000 1

Bitmap Heap Scan on shopify_orders_2019_06_09 o_6 (cost=1,038.05..55,466.29 rows=47,694 width=33) (actual time=3.425..29.232 rows=45,000 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=8,419
31. 2.402 2.402 ↑ 1.1 45,000 1

Bitmap Index Scan on shopify_orders_2019_06_09_on_shop_id (cost=0.00..1,026.13 rows=47,694 width=0) (actual time=2.402..2.402 rows=45,000 loops=1)

  • Index Cond: (shop_id = 80)
32. 9.082 9.902 ↑ 1.0 17,946 1

Bitmap Heap Scan on shopify_orders_2019_09_12 o_7 (cost=401.50..9,716.05 rows=18,204 width=32) (actual time=1.037..9.902 rows=17,946 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=2,093
33. 0.820 0.820 ↑ 1.0 17,946 1

Bitmap Index Scan on shopify_orders_2019_09_12_on_shop_id (cost=0.00..396.95 rows=18,204 width=0) (actual time=0.820..0.820 rows=17,946 loops=1)

  • Index Cond: (shop_id = 80)
34. 3.656 3.966 ↓ 1.0 7,383 1

Bitmap Heap Scan on shopify_orders_2018_01_06 o_8 (cost=160.54..17,527.33 rows=7,241 width=32) (actual time=0.382..3.966 rows=7,383 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=819
35. 0.310 0.310 ↓ 1.0 7,383 1

Bitmap Index Scan on shopify_orders_2018_01_06_on_shop_id (cost=0.00..158.73 rows=7,241 width=0) (actual time=0.309..0.310 rows=7,383 loops=1)

  • Index Cond: (shop_id = 80)
36. 13.320 14.478 ↓ 1.0 24,530 1

Bitmap Heap Scan on shopify_orders_2018_06_12 o_9 (cost=527.97..35,884.82 rows=24,199 width=32) (actual time=1.556..14.478 rows=24,530 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=3,519
37. 1.158 1.158 ↓ 1.0 24,530 1

Bitmap Index Scan on shopify_orders_2018_06_12_on_shop_id (cost=0.00..521.92 rows=24,199 width=0) (actual time=1.158..1.158 rows=24,530 loops=1)

  • Index Cond: (shop_id = 80)
38. 0.154 0.170 ↓ 1.5 197 1

Bitmap Heap Scan on shopify_orders_2017_01_06 o_10 (cost=5.46..500.49 rows=134 width=32) (actual time=0.026..0.170 rows=197 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=81
39. 0.016 0.016 ↓ 1.5 197 1

Bitmap Index Scan on shopify_orders_2017_01_06_on_shop_id (cost=0.00..5.42 rows=134 width=0) (actual time=0.016..0.016 rows=197 loops=1)

  • Index Cond: (shop_id = 80)
40. 0.846 0.910 ↑ 1.1 1,817 1

Bitmap Heap Scan on shopify_orders_2017_06_12 o_11 (cost=47.91..6,530.74 rows=1,998 width=31) (actual time=0.078..0.910 rows=1,817 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=158
41. 0.064 0.064 ↑ 1.1 1,817 1

Bitmap Index Scan on shopify_orders_2017_06_12_on_shop_id (cost=0.00..47.41 rows=1,998 width=0) (actual time=0.064..0.064 rows=1,817 loops=1)

  • Index Cond: (shop_id = 80)
42. 0.019 0.019 ↓ 2.3 16 1

Index Scan using shopify_orders_2016_01_12_on_shop_id on shopify_orders_2016_01_12 o_12 (cost=0.42..25.60 rows=7 width=32) (actual time=0.010..0.019 rows=16 loops=1)

  • Index Cond: (shop_id = 80)
43. 0.005 0.005 ↓ 0.0 0 1

Index Scan using shopify_orders_2015_01_12_on_shop_id on shopify_orders_2015_01_12 o_13 (cost=0.42..49.65 rows=29 width=31) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: (shop_id = 80)
44. 0.004 0.004 ↓ 0.0 0 1

Index Scan using shopify_orders_2014_01_12_on_shop_id on shopify_orders_2014_01_12 o_14 (cost=0.29..6.07 rows=1 width=31) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (shop_id = 80)
45. 0.004 0.004 ↓ 0.0 0 1

Index Scan using shopify_orders_2013_on_shop_id on shopify_orders_2013 o_15 (cost=0.28..8.30 rows=1 width=30) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (shop_id = 80)
46. 19.387 117.757 ↑ 1.0 34,839 1

Hash (cost=259,378.70..259,378.70 rows=34,931 width=185) (actual time=117.757..117.757 rows=34,839 loops=1)

  • Buckets: 32,768 Batches: 4 Memory Usage: 2,208kB
47. 11.466 98.370 ↑ 1.0 34,839 1

Nested Loop (cost=0.43..259,378.70 rows=34,931 width=185) (actual time=0.029..98.370 rows=34,839 loops=1)

48. 17.226 17.226 ↑ 1.0 34,839 1

Seq Scan on shopify_refund_line_items rl (cost=0.00..4,291.75 rows=34,931 width=44) (actual time=0.010..17.226 rows=34,839 loops=1)

  • Filter: ((created_at >= '2019-06-29 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-27 22:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 82,666
49. 69.678 69.678 ↑ 1.0 1 34,839

Index Scan using shopify_line_items_pkey on shopify_line_items l_1 (cost=0.43..7.30 rows=1 width=149) (actual time=0.002..0.002 rows=1 loops=34,839)

  • Index Cond: (id = rl.shopify_line_item_id)
50. 0.022 124.226 ↑ 7,087.6 14 1

Subquery Scan on *SELECT* 3 (cost=2,449.76..165,084.65 rows=99,227 width=1,191) (actual time=50.041..124.226 rows=14 loops=1)

51. 18.761 124.204 ↑ 7,087.6 14 1

Hash Join (cost=2,449.76..163,596.24 rows=99,227 width=1,183) (actual time=50.034..124.204 rows=14 loops=1)

  • Hash Cond: (o_16.id = a.shopify_order_id)
52. 9.472 91.459 ↑ 1.0 139,332 1

Append (cost=0.00..157,583.67 rows=142,922 width=32) (actual time=0.658..91.459 rows=139,332 loops=1)

53. 0.004 0.004 ↓ 0.0 0 1

Seq Scan on shopify_orders o_16 (cost=0.00..0.00 rows=1 width=32) (actual time=0.004..0.004 rows=0 loops=1)

  • Filter: (shop_id = 80)
54. 6.030 6.567 ↑ 1.0 12,795 1

Bitmap Heap Scan on shopify_orders_2019_01_03 o_17 (cost=290.22..11,256.94 rows=13,136 width=32) (actual time=0.653..6.567 rows=12,795 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=1,144
55. 0.537 0.537 ↑ 1.0 12,795 1

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.537..0.537 rows=12,795 loops=1)

  • Index Cond: (shop_id = 80)
56. 14.304 15.511 ↑ 1.0 29,648 1

Bitmap Heap Scan on shopify_orders_2019_03_06 o_18 (cost=663.07..19,896.79 rows=30,277 width=32) (actual time=1.517..15.511 rows=29,648 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=3,028
57. 1.207 1.207 ↑ 1.0 29,648 1

Bitmap Index Scan on shopify_orders_2019_03_06_on_shop_id (cost=0.00..655.50 rows=30,277 width=0) (actual time=1.207..1.207 rows=29,648 loops=1)

  • Index Cond: (shop_id = 80)
58. 27.145 29.550 ↑ 1.1 45,000 1

Bitmap Heap Scan on shopify_orders_2019_06_09 o_19 (cost=1,038.05..55,466.29 rows=47,694 width=33) (actual time=3.426..29.550 rows=45,000 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=8,419
59. 2.405 2.405 ↑ 1.1 45,000 1

Bitmap Index Scan on shopify_orders_2019_06_09_on_shop_id (cost=0.00..1,026.13 rows=47,694 width=0) (actual time=2.405..2.405 rows=45,000 loops=1)

  • Index Cond: (shop_id = 80)
60. 9.853 10.668 ↑ 1.0 17,946 1

Bitmap Heap Scan on shopify_orders_2019_09_12 o_20 (cost=401.50..9,716.05 rows=18,204 width=32) (actual time=1.033..10.668 rows=17,946 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=2,093
61. 0.815 0.815 ↑ 1.0 17,946 1

Bitmap Index Scan on shopify_orders_2019_09_12_on_shop_id (cost=0.00..396.95 rows=18,204 width=0) (actual time=0.815..0.815 rows=17,946 loops=1)

  • Index Cond: (shop_id = 80)
62. 3.706 4.017 ↓ 1.0 7,383 1

Bitmap Heap Scan on shopify_orders_2018_01_06 o_21 (cost=160.54..17,527.33 rows=7,241 width=32) (actual time=0.391..4.017 rows=7,383 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=819
63. 0.311 0.311 ↓ 1.0 7,383 1

Bitmap Index Scan on shopify_orders_2018_01_06_on_shop_id (cost=0.00..158.73 rows=7,241 width=0) (actual time=0.311..0.311 rows=7,383 loops=1)

  • Index Cond: (shop_id = 80)
64. 13.375 14.531 ↓ 1.0 24,530 1

Bitmap Heap Scan on shopify_orders_2018_06_12 o_22 (cost=527.97..35,884.82 rows=24,199 width=32) (actual time=1.551..14.531 rows=24,530 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=3,519
65. 1.156 1.156 ↓ 1.0 24,530 1

Bitmap Index Scan on shopify_orders_2018_06_12_on_shop_id (cost=0.00..521.92 rows=24,199 width=0) (actual time=1.155..1.156 rows=24,530 loops=1)

  • Index Cond: (shop_id = 80)
66. 0.156 0.174 ↓ 1.5 197 1

Bitmap Heap Scan on shopify_orders_2017_01_06 o_23 (cost=5.46..500.49 rows=134 width=32) (actual time=0.028..0.174 rows=197 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=81
67. 0.018 0.018 ↓ 1.5 197 1

Bitmap Index Scan on shopify_orders_2017_01_06_on_shop_id (cost=0.00..5.42 rows=134 width=0) (actual time=0.018..0.018 rows=197 loops=1)

  • Index Cond: (shop_id = 80)
68. 0.867 0.930 ↑ 1.1 1,817 1

Bitmap Heap Scan on shopify_orders_2017_06_12 o_24 (cost=47.91..6,530.74 rows=1,998 width=31) (actual time=0.080..0.930 rows=1,817 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=158
69. 0.063 0.063 ↑ 1.1 1,817 1

Bitmap Index Scan on shopify_orders_2017_06_12_on_shop_id (cost=0.00..47.41 rows=1,998 width=0) (actual time=0.063..0.063 rows=1,817 loops=1)

  • Index Cond: (shop_id = 80)
70. 0.018 0.018 ↓ 2.3 16 1

Index Scan using shopify_orders_2016_01_12_on_shop_id on shopify_orders_2016_01_12 o_25 (cost=0.42..25.60 rows=7 width=32) (actual time=0.010..0.018 rows=16 loops=1)

  • Index Cond: (shop_id = 80)
71. 0.006 0.006 ↓ 0.0 0 1

Index Scan using shopify_orders_2015_01_12_on_shop_id on shopify_orders_2015_01_12 o_26 (cost=0.42..49.65 rows=29 width=31) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: (shop_id = 80)
72. 0.004 0.004 ↓ 0.0 0 1

Index Scan using shopify_orders_2014_01_12_on_shop_id on shopify_orders_2014_01_12 o_27 (cost=0.29..6.07 rows=1 width=31) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (shop_id = 80)
73. 0.007 0.007 ↓ 0.0 0 1

Index Scan using shopify_orders_2013_on_shop_id on shopify_orders_2013 o_28 (cost=0.28..8.30 rows=1 width=30) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: (shop_id = 80)
74. 4.125 13.984 ↓ 1.0 28,140 1

Hash (cost=2,098.55..2,098.55 rows=28,096 width=56) (actual time=13.983..13.984 rows=28,140 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 2,064kB
75. 9.859 9.859 ↓ 1.0 28,140 1

Seq Scan on shopify_order_adjustments a (cost=0.00..2,098.55 rows=28,096 width=56) (actual time=0.013..9.859 rows=28,140 loops=1)

  • Filter: ((created_at >= '2019-06-29 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-27 22:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 28,662
76. 16.863 5,106.897 ↓ 252.2 50,444 1

Subquery Scan on *SELECT* 4 (cost=292,214.59..292,220.09 rows=200 width=1,200) (actual time=5,059.916..5,106.897 rows=50,444 loops=1)

77. 54.837 5,090.034 ↓ 252.2 50,444 1

HashAggregate (cost=292,214.59..292,216.59 rows=200 width=1,188) (actual time=5,059.908..5,090.034 rows=50,444 loops=1)

  • Group Key: o_29.id
78. 128.894 5,035.197 ↑ 1.1 53,079 1

Hash Right Join (cost=266,996.34..291,336.20 rows=58,559 width=81) (actual time=4,871.196..5,035.197 rows=53,079 loops=1)

  • Hash Cond: (s.shopify_shipping_line_id = sl.id)
79. 74.251 74.251 ↑ 1.0 595,818 1

Seq Scan on shopify_shipping_tax_lines s (cost=0.00..15,352.13 rows=596,413 width=16) (actual time=0.021..74.251 rows=595,818 loops=1)

80. 17.098 4,832.052 ↑ 1.2 50,444 1

Hash (cost=265,463.35..265,463.35 rows=58,559 width=81) (actual time=4,832.051..4,832.052 rows=50,444 loops=1)

  • Buckets: 32,768 Batches: 2 Memory Usage: 3,215kB
81. 276.227 4,814.954 ↑ 1.2 50,444 1

Hash Join (cost=173,000.33..265,463.35 rows=58,559 width=81) (actual time=4,492.550..4,814.954 rows=50,444 loops=1)

  • Hash Cond: (o_29.id = sl.shopify_order_id)
82. 3.583 50.022 ↑ 1.1 50,710 1

Append (cost=0.00..65,795.33 rows=57,138 width=41) (actual time=3.455..50.022 rows=50,710 loops=1)

83. 0.005 0.005 ↓ 0.0 0 1

Seq Scan on shopify_orders o_29 (cost=0.00..0.00 rows=1 width=40) (actual time=0.005..0.005 rows=0 loops=1)

  • Filter: ((created_at >= '2019-06-29 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-27 22:59:59'::timestamp without time zone) AND (shop_id = 80))
84. 33.087 35.497 ↑ 1.2 32,764 1

Bitmap Heap Scan on shopify_orders_2019_06_09 o_30 (cost=1,035.87..55,702.57 rows=38,951 width=41) (actual time=3.449..35.497 rows=32,764 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Filter: ((created_at >= '2019-06-29 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-27 22:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 12,236
  • Heap Blocks: exact=8,419
85. 2.410 2.410 ↑ 1.1 45,000 1

Bitmap Index Scan on shopify_orders_2019_06_09_on_shop_id (cost=0.00..1,026.13 rows=47,694 width=0) (actual time=2.410..2.410 rows=45,000 loops=1)

  • Index Cond: (shop_id = 80)
86. 9.961 10.937 ↑ 1.0 17,946 1

Bitmap Heap Scan on shopify_orders_2019_09_12 o_31 (cost=401.49..9,807.06 rows=18,186 width=40) (actual time=1.196..10.937 rows=17,946 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Filter: ((created_at >= '2019-06-29 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-27 22:59:59'::timestamp without time zone))
  • Heap Blocks: exact=2,093
87. 0.976 0.976 ↑ 1.0 17,946 1

Bitmap Index Scan on shopify_orders_2019_09_12_on_shop_id (cost=0.00..396.95 rows=18,204 width=0) (actual time=0.976..0.976 rows=17,946 loops=1)

  • Index Cond: (shop_id = 80)
88. 608.975 4,488.705 ↓ 1.0 2,833,782 1

Hash (cost=113,126.70..113,126.70 rows=2,812,370 width=48) (actual time=4,488.705..4,488.705 rows=2,833,782 loops=1)

  • Buckets: 65,536 Batches: 64 Memory Usage: 3,695kB
89. 3,879.730 3,879.730 ↓ 1.0 2,833,785 1

Seq Scan on shopify_shipping_lines sl (cost=0.00..113,126.70 rows=2,812,370 width=48) (actual time=0.462..3,879.730 rows=2,833,785 loops=1)

Planning time : 4.424 ms
Execution time : 45,673.294 ms