explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WYsE : test

Settings
# exclusive inclusive rows x rows loops node
1. 0.074 25,921.569 ↓ 2.5 500 1

Limit (cost=2,974,726.81..2,974,727.31 rows=200 width=292) (actual time=25,921.471..25,921.569 rows=500 loops=1)

2. 31.415 25,921.495 ↓ 2.5 500 1

Sort (cost=2,974,726.81..2,974,727.31 rows=200 width=292) (actual time=25,921.469..25,921.495 rows=500 loops=1)

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

Subquery Scan on tmp (cost=2,311,189.17..2,974,719.17 rows=200 width=292) (actual time=23,071.423..25,890.080 rows=50,718 loops=1)

4. 2,779.030 25,882.775 ↓ 253.6 50,718 1

GroupAggregate (cost=2,311,189.17..2,974,717.17 rows=200 width=304) (actual time=23,071.421..25,882.775 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. 92.739 23,103.745 ↑ 11.5 102,059 1

Sort (cost=2,311,189.17..2,314,131.95 rows=1,177,112 width=92) (actual time=23,071.246..23,103.745 rows=102,059 loops=1)

  • Sort Key: sv.id, sv.name
  • Sort Method: external merge Disk: 8,216kB
6. 12.184 23,011.006 ↑ 11.5 102,059 1

Subquery Scan on sv (cost=769,920.22..2,071,795.14 rows=1,177,112 width=92) (actual time=7,777.678..23,011.006 rows=102,059 loops=1)

7. 8.675 22,998.822 ↑ 11.5 102,059 1

Append (cost=769,920.22..2,060,024.02 rows=1,177,112 width=1,223) (actual time=7,777.677..22,998.822 rows=102,059 loops=1)

8. 15.578 17,441.674 ↑ 22.8 51,615 1

Result (cost=769,920.22..1,762,515.08 rows=1,176,912 width=1,223) (actual time=7,777.675..17,441.674 rows=51,615 loops=1)

9. 4.143 17,426.096 ↑ 22.8 51,615 1

Append (cost=769,920.22..1,744,861.40 rows=1,176,912 width=1,215) (actual time=7,777.672..17,426.096 rows=51,615 loops=1)

10. 15.428 17,298.062 ↑ 20.9 51,601 1

Result (cost=769,920.22..1,575,261.08 rows=1,079,893 width=1,215) (actual time=7,777.672..17,298.062 rows=51,601 loops=1)

11. 4.218 17,282.634 ↑ 20.9 51,601 1

Append (cost=769,920.22..1,561,762.42 rows=1,079,893 width=1,211) (actual time=7,777.667..17,282.634 rows=51,601 loops=1)

12. 20.069 17,011.634 ↑ 20.6 51,468 1

Subquery Scan on *SELECT* 1 (cost=769,920.22..1,134,000.11 rows=1,061,954 width=1,058) (actual time=7,777.667..17,011.634 rows=51,468 loops=1)

13. 9,170.332 16,991.565 ↑ 20.6 51,468 1

Hash Join (cost=769,920.22..1,120,725.68 rows=1,061,954 width=1,054) (actual time=7,777.663..16,991.565 rows=51,468 loops=1)

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

Append (cost=0.00..65,339.66 rows=55,622 width=725) (actual time=3.455..50.015 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.001..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. 29.808 32.221 ↑ 1.2 32,764 1

Bitmap Heap Scan on shopify_orders_2019_06_09 o_1 (cost=998.30..55,226.90 rows=37,795 width=779) (actual time=3.453..32.221 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.413 2.413 ↑ 1.0 45,000 1

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

  • Index Cond: (shop_id = 80)
18. 12.630 13.649 ↓ 1.0 17,946 1

Bitmap Heap Scan on shopify_orders_2019_09_12 o_2 (cost=394.71..9,834.64 rows=17,826 width=610) (actual time=1.239..13.649 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.019 1.019 ↓ 1.0 17,946 1

Bitmap Index Scan on shopify_orders_2019_09_12_on_shop_id (cost=0.00..390.25 rows=17,845 width=0) (actual time=1.019..1.019 rows=17,946 loops=1)

  • Index Cond: (shop_id = 80)
20. 4,481.987 7,771.218 ↓ 1.0 5,335,850 1

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

  • Buckets: 16,384 Batches: 512 Memory Usage: 3,145kB
21. 3,289.231 3,289.231 ↓ 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=0.281..3,289.231 rows=5,335,850 loops=1)

22. 0.080 266.782 ↑ 134.9 133 1

Subquery Scan on *SELECT* 2 (cost=260,737.34..422,362.85 rows=17,939 width=1,136) (actual time=159.237..266.782 rows=133 loops=1)

23. 39.460 266.702 ↑ 134.9 133 1

Hash Join (cost=260,737.34..422,093.76 rows=17,939 width=1,128) (actual time=159.231..266.702 rows=133 loops=1)

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

Append (cost=0.00..156,327.19 rows=139,741 width=32) (actual time=0.678..92.517 rows=139,332 loops=1)

25. 0.011 0.011 ↓ 0.0 0 1

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

  • Filter: (shop_id = 80)
26. 7.491 8.041 ↑ 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.667..8.041 rows=12,795 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=1,144
27. 0.550 0.550 ↑ 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.550..0.550 rows=12,795 loops=1)

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

Bitmap Heap Scan on shopify_orders_2019_03_06 o_5 (cost=662.55..19,901.18 rows=30,210 width=32) (actual time=2.007..15.863 rows=29,648 loops=1)

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

Bitmap Index Scan on shopify_orders_2019_03_06_on_shop_id (cost=0.00..655.00 rows=30,210 width=0) (actual time=1.652..1.653 rows=29,648 loops=1)

  • Index Cond: (shop_id = 80)
30. 26.851 29.236 ↑ 1.0 45,000 1

Bitmap Heap Scan on shopify_orders_2019_06_09 o_6 (cost=1,000.34..54,999.31 rows=45,924 width=33) (actual time=3.408..29.236 rows=45,000 loops=1)

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

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

  • Index Cond: (shop_id = 80)
32. 9.145 9.964 ↓ 1.0 17,946 1

Bitmap Heap Scan on shopify_orders_2019_09_12 o_7 (cost=394.72..9,745.42 rows=17,845 width=32) (actual time=1.035..9.964 rows=17,946 loops=1)

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

Bitmap Index Scan on shopify_orders_2019_09_12_on_shop_id (cost=0.00..390.25 rows=17,845 width=0) (actual time=0.818..0.819 rows=17,946 loops=1)

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

Bitmap Heap Scan on shopify_orders_2018_01_06 o_8 (cost=159.39..17,285.67 rows=7,093 width=32) (actual time=0.384..3.970 rows=7,383 loops=1)

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

Bitmap Index Scan on shopify_orders_2018_01_06_on_shop_id (cost=0.00..157.62 rows=7,093 width=0) (actual time=0.312..0.312 rows=7,383 loops=1)

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

Bitmap Heap Scan on shopify_orders_2018_06_12 o_9 (cost=514.01..35,466.71 rows=23,430 width=32) (actual time=1.573..14.674 rows=24,530 loops=1)

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

Bitmap Index Scan on shopify_orders_2018_06_12_on_shop_id (cost=0.00..508.15 rows=23,430 width=0) (actual time=1.173..1.173 rows=24,530 loops=1)

  • Index Cond: (shop_id = 80)
38. 0.161 0.181 ↑ 1.0 197 1

Bitmap Heap Scan on shopify_orders_2017_01_06 o_10 (cost=5.96..723.86 rows=199 width=32) (actual time=0.031..0.181 rows=197 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=81
39. 0.020 0.020 ↑ 1.0 197 1

Bitmap Index Scan on shopify_orders_2017_01_06_on_shop_id (cost=0.00..5.91 rows=199 width=0) (actual time=0.020..0.020 rows=197 loops=1)

  • Index Cond: (shop_id = 80)
40. 0.927 0.991 ↑ 1.0 1,817 1

Bitmap Heap Scan on shopify_orders_2017_06_12 o_11 (cost=42.79..6,113.71 rows=1,854 width=31) (actual time=0.109..0.991 rows=1,817 loops=1)

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

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

  • Index Cond: (shop_id = 80)
42. 0.021 0.021 ↑ 1.2 16 1

Index Scan using shopify_orders_2016_01_12_on_shop_id on shopify_orders_2016_01_12 o_12 (cost=0.42..62.50 rows=20 width=32) (actual time=0.013..0.021 rows=16 loops=1)

  • Index Cond: (shop_id = 80)
43. 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_13 (cost=0.42..8.44 rows=1 width=31) (actual time=0.006..0.006 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..56.42 rows=27 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. 20.968 134.725 ↑ 1.0 34,839 1

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

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

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

48. 19.454 19.454 ↑ 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.011..19.454 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.020 123.891 ↑ 6,929.9 14 1

Subquery Scan on *SELECT* 3 (cost=2,449.76..163,715.76 rows=97,019 width=1,191) (actual time=50.512..123.891 rows=14 loops=1)

51. 18.875 123.871 ↑ 6,929.9 14 1

Hash Join (cost=2,449.76..162,260.47 rows=97,019 width=1,183) (actual time=50.505..123.871 rows=14 loops=1)

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

Append (cost=0.00..156,327.19 rows=139,741 width=32) (actual time=0.658..90.757 rows=139,332 loops=1)

53. 0.005 0.005 ↓ 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.005 rows=0 loops=1)

  • Filter: (shop_id = 80)
54. 6.010 6.548 ↑ 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.652..6.548 rows=12,795 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=1,144
55. 0.538 0.538 ↑ 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.538..0.538 rows=12,795 loops=1)

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

Bitmap Heap Scan on shopify_orders_2019_03_06 o_18 (cost=662.55..19,901.18 rows=30,210 width=32) (actual time=1.525..15.551 rows=29,648 loops=1)

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

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

  • Index Cond: (shop_id = 80)
58. 27.274 29.643 ↑ 1.0 45,000 1

Bitmap Heap Scan on shopify_orders_2019_06_09 o_19 (cost=1,000.34..54,999.31 rows=45,924 width=33) (actual time=3.394..29.643 rows=45,000 loops=1)

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

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

  • Index Cond: (shop_id = 80)
60. 9.283 10.091 ↓ 1.0 17,946 1

Bitmap Heap Scan on shopify_orders_2019_09_12 o_20 (cost=394.72..9,745.42 rows=17,845 width=32) (actual time=1.026..10.091 rows=17,946 loops=1)

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

Bitmap Index Scan on shopify_orders_2019_09_12_on_shop_id (cost=0.00..390.25 rows=17,845 width=0) (actual time=0.808..0.808 rows=17,946 loops=1)

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

Bitmap Heap Scan on shopify_orders_2018_01_06 o_21 (cost=159.39..17,285.67 rows=7,093 width=32) (actual time=0.382..4.002 rows=7,383 loops=1)

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

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

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

Bitmap Heap Scan on shopify_orders_2018_06_12 o_22 (cost=514.01..35,466.71 rows=23,430 width=32) (actual time=1.549..14.397 rows=24,530 loops=1)

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

Bitmap Index Scan on shopify_orders_2018_06_12_on_shop_id (cost=0.00..508.15 rows=23,430 width=0) (actual time=1.144..1.144 rows=24,530 loops=1)

  • Index Cond: (shop_id = 80)
66. 0.155 0.171 ↑ 1.0 197 1

Bitmap Heap Scan on shopify_orders_2017_01_06 o_23 (cost=5.96..723.86 rows=199 width=32) (actual time=0.025..0.171 rows=197 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Heap Blocks: exact=81
67. 0.016 0.016 ↑ 1.0 197 1

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

  • Index Cond: (shop_id = 80)
68. 0.849 0.914 ↑ 1.0 1,817 1

Bitmap Heap Scan on shopify_orders_2017_06_12 o_24 (cost=42.79..6,113.71 rows=1,854 width=31) (actual time=0.079..0.914 rows=1,817 loops=1)

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

Bitmap Index Scan on shopify_orders_2017_06_12_on_shop_id (cost=0.00..42.33 rows=1,854 width=0) (actual time=0.065..0.065 rows=1,817 loops=1)

  • Index Cond: (shop_id = 80)
70. 0.019 0.019 ↑ 1.2 16 1

Index Scan using shopify_orders_2016_01_12_on_shop_id on shopify_orders_2016_01_12 o_25 (cost=0.42..62.50 rows=20 width=32) (actual time=0.010..0.019 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..8.44 rows=1 width=31) (actual time=0.005..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..56.42 rows=27 width=31) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (shop_id = 80)
73. 0.004 0.004 ↓ 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.004..0.004 rows=0 loops=1)

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

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

  • Buckets: 32,768 Batches: 1 Memory Usage: 2,064kB
75. 9.963 9.963 ↓ 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.015..9.963 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.950 5,548.473 ↓ 252.2 50,444 1

Subquery Scan on *SELECT* 4 (cost=291,617.88..291,623.38 rows=200 width=1,200) (actual time=5,501.719..5,548.473 rows=50,444 loops=1)

77. 53.832 5,531.523 ↓ 252.2 50,444 1

HashAggregate (cost=291,617.88..291,619.88 rows=200 width=1,188) (actual time=5,501.710..5,531.523 rows=50,444 loops=1)

  • Group Key: o_29.id
78. 111.678 5,477.691 ↑ 1.1 53,079 1

Hash Right Join (cost=266,447.23..290,762.80 rows=57,005 width=81) (actual time=5,331.521..5,477.691 rows=53,079 loops=1)

  • Hash Cond: (s.shopify_shipping_line_id = sl.id)
79. 73.583 73.583 ↑ 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.019..73.583 rows=595,818 loops=1)

80. 14.021 5,292.430 ↑ 1.1 50,444 1

Hash (cost=264,954.67..264,954.67 rows=57,005 width=81) (actual time=5,292.430..5,292.430 rows=50,444 loops=1)

  • Buckets: 32,768 Batches: 2 Memory Usage: 3,215kB
81. 247.322 5,278.409 ↑ 1.1 50,444 1

Hash Join (cost=173,000.33..264,954.67 rows=57,005 width=81) (actual time=4,992.228..5,278.409 rows=50,444 loops=1)

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

Append (cost=0.00..65,339.66 rows=55,622 width=41) (actual time=3.449..42.542 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. 25.634 28.041 ↑ 1.2 32,764 1

Bitmap Heap Scan on shopify_orders_2019_06_09 o_30 (cost=998.30..55,226.90 rows=37,795 width=41) (actual time=3.443..28.041 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.407 2.407 ↑ 1.0 45,000 1

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

  • Index Cond: (shop_id = 80)
86. 10.057 10.867 ↓ 1.0 17,946 1

Bitmap Heap Scan on shopify_orders_2019_09_12 o_31 (cost=394.71..9,834.64 rows=17,826 width=40) (actual time=1.028..10.867 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.810 0.810 ↓ 1.0 17,946 1

Bitmap Index Scan on shopify_orders_2019_09_12_on_shop_id (cost=0.00..390.25 rows=17,845 width=0) (actual time=0.810..0.810 rows=17,946 loops=1)

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

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

  • Buckets: 65,536 Batches: 64 Memory Usage: 3,695kB
89. 4,393.082 4,393.082 ↓ 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.602..4,393.082 rows=2,833,785 loops=1)

Planning time : 4.994 ms
Execution time : 25,924.366 ms