explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9Vfq

Settings
# exclusive inclusive rows x rows loops node
1. 0.275 52,282.576 ↑ 1.0 500 1

Subquery Scan on final_tmp (cost=15,162,141.97..15,162,148.22 rows=500 width=1,550) (actual time=52,282.209..52,282.576 rows=500 loops=1)

2. 0.067 52,282.301 ↑ 1.0 500 1

Limit (cost=15,162,141.97..15,162,143.22 rows=500 width=1,554) (actual time=52,282.205..52,282.301 rows=500 loops=1)

3. 45.152 52,282.234 ↑ 7.8 500 1

Sort (cost=15,162,141.97..15,162,151.77 rows=3,919 width=1,554) (actual time=52,282.204..52,282.234 rows=500 loops=1)

  • Sort Key: tmp."Order Name", tmp.order_discr
  • Sort Method: top-N heapsort Memory: 1,313kB
4. 7.274 52,237.082 ↓ 5.4 21,080 1

Subquery Scan on tmp (cost=10,498,224.48..15,161,946.69 rows=3,919 width=1,554) (actual time=49,794.353..52,237.082 rows=21,080 loops=1)

5. 2,377.283 52,229.808 ↓ 5.4 21,080 1

GroupAggregate (cost=10,498,224.48..15,161,907.50 rows=3,919 width=1,590) (actual time=49,794.350..52,229.808 rows=21,080 loops=1)

  • Group Key: "*SELECT* 1".name, (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, rp_order_date("*SELECT* 1".id))), 'MM-DD-YYYY'::text)), (order_cancelled_status("*SELECT* 1".id)), "*SELECT* 1".email, (rp_order_placed_by("*SELECT* 1".id)), (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, "*SELECT* 1".processed_at)), 'MM-DD-YYYY'::text)), (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, "*SELECT* 1".closed_at)), 'MM-DD-YYYY'::text)), (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, "*SELECT* 1".updated_at)), 'MM-DD-YYYY'::text)), (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, "*SELECT* 1".cancelled_at)), 'MM-DD-YYYY'::text)), (rp_line_properties_name("*SELECT* 1".line_item_id, 0)), (rp_line_properties_value("*SELECT* 1".line_item_id, 0)), "*SELECT* 1".title, "*SELECT* 1".variant_title, "*SELECT* 1".product_name, "*SELECT* 1".sku, (variant_barcode("*SELECT* 1".shopify_product_variant_id)), "*SELECT* 1".vendor, p.product_type, (product_description("*SELECT* 1".shopify_product_id)), (rp_custom_collections("*SELECT* 1".shopify_product_id)), (smart_collections("*SELECT* 1".shopify_product_id)), (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, rp_customer_first_order_date("*SELECT* 1".shopify_customer_id))), 'MM-DD-YYYY'::text)), sa.name, (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, rp_customer_last_order_date("*SELECT* 1".shopify_customer_id))), 'MM-DD-YYYY'::text)), c.email, c.note, c.tags, c.accepts_marketing, (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, c.created_at)), 'MM-DD-YYYY'::text)), c.last_order_name, c.multipass_identifier, c.state, c.tax_exempt, (customer_address1("*SELECT* 1".shopify_customer_id)), (customer_address2("*SELECT* 1".shopify_customer_id)), (customer_city("*SELECT* 1".shopify_customer_id)), (customer_company("*SELECT* 1".shopify_customer_id)), (customer_phone("*SELECT* 1".shopify_customer_id)), (customer_province("*SELECT* 1".shopify_customer_id)), (customer_country("*SELECT* 1".shopify_customer_id)), (customer_zip("*SELECT* 1".shopify_customer_id)), ca.province_code, ca.country_code, ca.country
  • Filter: (CASE WHEN ((GROUPING("*SELECT* 1".name) = 0) AND (GROUPING((to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, rp_order_date("*SELECT* 1".id))), 'MM-DD-YYYY'::text))) = 0) AND (GROUPING((order_cancelled_status("*SELECT* 1".id))) = 0) AND (GROUPING("*SELECT* 1".email) = 0) AND (GROUPING((rp_order_placed_by("*SELECT* 1".id))) = 0) AND (GROUPING((to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, "*SELECT* 1".processed_at)), 'MM-DD-YYYY'::text))) = 0) AND (GROUPING((to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, "*SELECT* 1".closed_at)), 'MM-DD-YYYY'::text))) = 0) AND (GROUPING((to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, "*SELECT* 1".updated_at)), 'MM-DD-YYYY'::text))) = 0) AND (GROUPING((to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, "*SELECT* 1".cancelled_at)), 'MM-DD-YYYY'::text))) = 0) AND (GROUPING((rp_line_properties_name("*SELECT* 1".line_item_id, 0))) = 0) AND (GROUPING((rp_line_properties_value("*SELECT* 1".line_item_id, 0))) = 0) AND (GROUPING("*SELECT* 1".title) = 0) AND (GROUPING("*SELECT* 1".variant_title) = 0) AND (GROUPING("*SELECT* 1".product_name) = 0) AND (GROUPING("*SELECT* 1".sku) = 0) AND (GROUPING((variant_barcode("*SELECT* 1".shopify_product_variant_id))) = 0) AND (GROUPING("*SELECT* 1".vendor) = 0) AND (GROUPING(p.product_type) = 0) AND (GROUPING((product_description("*SELECT* 1".shopify_product_id))) = 0) AND (GROUPING((rp_custom_collections("*SELECT* 1".shopify_product_id))) = 0) AND (GROUPING((smart_collections("*SELECT* 1".shopify_product_id))) = 0) AND (GROUPING((to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, rp_customer_first_order_date("*SELECT* 1".shopify_customer_id))), 'MM-DD-YYYY'::text))) = 0) AND (GROUPING(sa.name) = 0) AND (GROUPING((to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, rp_customer_last_order_date("*SELECT* 1".shopify_customer_id))), 'MM-DD-YYYY'::text))) = 0) AND (GROUPING(c.email) = 0) AND (GROUPING(c.note) = 0) AND (GROUPING(c.tags) = 0) AND (GROUPING(c.accepts_marketing) = 0) AND (GROUPING((to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, c.created_at)), 'MM-DD-YYYY'::text))) = 0) AND (GROUPING(c.last_order_name) = 0) AND (GROUPING(c.multipass_identifier) = 0) AND (GROUPING(c.state) = 0) AND (GROUPING(c.tax_exempt) = 0) AND (GROUPING((customer_address1("*SELECT* 1".shopify_customer_id))) = 0) AND (GROUPING((customer_address2("*SELECT* 1".shopify_customer_id))) = 0) AND (GROUPING((customer_city("*SELECT* 1".shopify_customer_id))) = 0) AND (GROUPING((customer_company("*SELECT* 1".shopify_customer_id))) = 0) AND (GROUPING((customer_phone("*SELECT* 1".shopify_customer_id))) = 0) AND (GROUPING((customer_province("*SELECT* 1".shopify_customer_id))) = 0) AND (GROUPING((customer_country("*SELECT* 1".shopify_customer_id))) = 0) AND (GROUPING((customer_zip("*SELECT* 1".shopify_customer_id))) = 0) AND (GROUPING(ca.province_code) = 0) AND (GROUPING(ca.country_code) = 0) AND (GROUPING(ca.country) = 0)) THEN 1 ELSE 0 END = 1)
6. 207.250 49,852.525 ↑ 37.1 21,103 1

Sort (cost=10,498,224.48..10,500,184.04 rows=783,824 width=1,218) (actual time=49,792.175..49,852.525 rows=21,103 loops=1)

  • Sort Key: "*SELECT* 1".name, (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, rp_order_date("*SELECT* 1".id))), 'MM-DD-YYYY'::text)), (order_cancelled_status("*SELECT* 1".id)), "*SELECT* 1".email, (rp_order_placed_by("*SELECT* 1".id)), (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, "*SELECT* 1".processed_at)), 'MM-DD-YYYY'::text)), (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, "*SELECT* 1".closed_at)), 'MM-DD-YYYY'::text)), (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, "*SELECT* 1".updated_at)), 'MM-DD-YYYY'::text)), (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, "*SELECT* 1".cancelled_at)), 'MM-DD-YYYY'::text)), (rp_line_properties_name("*SELECT* 1".line_item_id, 0)), (rp_line_properties_value("*SELECT* 1".line_item_id, 0)), "*SELECT* 1".title, "*SELECT* 1".variant_title, "*SELECT* 1".product_name, "*SELECT* 1".sku, (variant_barcode("*SELECT* 1".shopify_product_variant_id)), "*SELECT* 1".vendor, p.product_type, (product_description("*SELECT* 1".shopify_product_id)), (rp_custom_collections("*SELECT* 1".shopify_product_id)), (smart_collections("*SELECT* 1".shopify_product_id)), (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, rp_customer_first_order_date("*SELECT* 1".shopify_customer_id))), 'MM-DD-YYYY'::text)), sa.name, (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, rp_customer_last_order_date("*SELECT* 1".shopify_customer_id))), 'MM-DD-YYYY'::text)), c.email, c.note, c.tags, c.accepts_marketing, (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, c.created_at)), 'MM-DD-YYYY'::text)), c.last_order_name, c.multipass_identifier, c.state, c.tax_exempt, (customer_address1("*SELECT* 1".shopify_customer_id)), (customer_address2("*SELECT* 1".shopify_customer_id)), (customer_city("*SELECT* 1".shopify_customer_id)), (customer_company("*SELECT* 1".shopify_customer_id)), (customer_phone("*SELECT* 1".shopify_customer_id)), (customer_province("*SELECT* 1".shopify_customer_id)), (customer_country("*SELECT* 1".shopify_customer_id)), (customer_zip("*SELECT* 1".shopify_customer_id)), ca.province_code, ca.country_code, ca.country
  • Sort Method: external merge Disk: 33,200kB
7. 22,205.936 49,645.275 ↑ 37.1 21,103 1

Nested Loop Left Join (cost=1,915,845.97..9,705,021.45 rows=783,824 width=1,218) (actual time=10,567.833..49,645.275 rows=21,103 loops=1)

8. 31.303 27,143.897 ↑ 37.1 21,103 1

Nested Loop Left Join (cost=1,915,845.40..4,743,074.09 rows=783,824 width=397) (actual time=10,555.827..27,143.897 rows=21,103 loops=1)

9. 185.511 27,007.079 ↑ 37.1 21,103 1

Hash Left Join (cost=1,915,844.84..3,439,581.17 rows=783,824 width=391) (actual time=10,554.432..27,007.079 rows=21,103 loops=1)

  • Hash Cond: ("*SELECT* 1".shopify_product_id = p.id)
10. 5,956.651 25,952.313 ↑ 37.1 21,103 1

Hash Right Join (cost=1,716,580.30..3,149,977.08 rows=783,824 width=381) (actual time=9,684.855..25,952.313 rows=21,103 loops=1)

  • Hash Cond: (ca.shopify_customer_id = sc.id)
11. 12,101.959 12,101.959 ↓ 1.0 19,521,001 1

Seq Scan on shopify_customer_addresses ca (cost=0.00..1,060,196.38 rows=18,873,799 width=25) (actual time=0.012..12,101.959 rows=19,521,001 loops=1)

  • Filter: "default
  • Rows Removed by Filter: 11,885,243
12. 48.917 7,893.703 ↑ 37.1 21,103 1

Hash (cost=1,668,509.50..1,668,509.50 rows=783,824 width=372) (actual time=7,893.703..7,893.703 rows=21,103 loops=1)

  • Buckets: 16,384 Batches: 128 Memory Usage: 278kB
13. 8.370 7,844.786 ↑ 37.1 21,103 1

Nested Loop Left Join (cost=1.13..1,668,509.50 rows=783,824 width=372) (actual time=2.597..7,844.786 rows=21,103 loops=1)

14. 2.136 6,042.661 ↑ 37.1 21,103 1

Append (cost=0.56..829,731.34 rows=783,824 width=1,259) (actual time=1.880..6,042.661 rows=21,103 loops=1)

15. 7.253 6,040.523 ↑ 37.1 21,103 1

Result (cost=0.56..825,812.16 rows=783,823 width=1,259) (actual time=1.879..6,040.523 rows=21,103 loops=1)

16. 1.998 6,033.270 ↑ 37.1 21,103 1

Append (cost=0.56..814,054.82 rows=783,823 width=1,251) (actual time=1.876..6,033.270 rows=21,103 loops=1)

17. 4.783 5,401.985 ↑ 57.4 13,542 1

Result (cost=0.56..773,473.69 rows=777,386 width=1,251) (actual time=1.875..5,401.985 rows=13,542 loops=1)

18. 1.474 5,397.202 ↑ 57.4 13,542 1

Append (cost=0.56..763,756.36 rows=777,386 width=1,247) (actual time=1.872..5,397.202 rows=13,542 loops=1)

19. 5.432 3,154.011 ↑ 59.6 13,043 1

Subquery Scan on *SELECT* 1 (cost=0.56..703,689.92 rows=777,063 width=1,009) (actual time=1.871..3,154.011 rows=13,043 loops=1)

20. 14.636 3,148.579 ↑ 59.6 13,043 1

Nested Loop (cost=0.56..693,976.63 rows=777,063 width=1,005) (actual time=1.857..3,148.579 rows=13,043 loops=1)

21. 0.890 104.022 ↓ 1.2 7,789 1

Append (cost=0.00..6,196.91 rows=6,366 width=649) (actual time=1.096..104.022 rows=7,789 loops=1)

22. 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: ((test IS NOT TRUE) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone) AND (shop_id = 164))
23. 2.721 2.721 ↓ 3.0 592 1

Index Scan using shopify_orders_2019_01_03_on_shop_id on shopify_orders_2019_01_03 o_1 (cost=0.42..203.26 rows=198 width=595) (actual time=1.093..2.721 rows=592 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
24. 1.707 1.707 ↑ 1.2 383 1

Index Scan using shopify_orders_2019_03_06_on_shop_id on shopify_orders_2019_03_06 o_2 (cost=0.43..406.41 rows=445 width=626) (actual time=0.787..1.707 rows=383 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
25. 3.422 3.422 ↑ 1.5 509 1

Index Scan using shopify_orders_2019_06_09_on_shop_id on shopify_orders_2019_06_09 o_3 (cost=0.43..725.73 rows=752 width=744) (actual time=1.275..3.422 rows=509 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
26. 1.790 1.790 ↑ 1.9 139 1

Index Scan using shopify_orders_2019_09_12_ix_shop_id_created_at on shopify_orders_2019_09_12 o_4 (cost=0.56..282.65 rows=271 width=614) (actual time=1.243..1.790 rows=139 loops=1)

  • Index Cond: ((shop_id = 164) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
  • Filter: (test IS NOT TRUE)
27. 65.223 65.223 ↑ 1.2 1,277 1

Index Scan using shopify_orders_2018_01_06_on_shop_id on shopify_orders_2018_01_06 o_5 (cost=0.42..1,527.85 rows=1,582 width=655) (actual time=0.690..65.223 rows=1,277 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
28. 6.530 6.530 ↓ 3.4 1,865 1

Index Scan using shopify_orders_2018_06_12_on_shop_id on shopify_orders_2018_06_12 o_6 (cost=0.43..560.82 rows=544 width=574) (actual time=0.871..6.530 rows=1,865 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
29. 7.498 7.498 ↓ 1.3 479 1

Index Scan using shopify_orders_2017_01_06_on_shop_id on shopify_orders_2017_01_06 o_7 (cost=0.42..354.04 rows=356 width=616) (actual time=1.263..7.498 rows=479 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
30. 12.659 12.659 ↓ 1.2 2,544 1

Index Scan using shopify_orders_2017_06_12_on_shop_id on shopify_orders_2017_06_12 o_8 (cost=0.43..2,071.24 rows=2,186 width=650) (actual time=1.668..12.659 rows=2,544 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
31. 1.580 1.580 ↑ 31.0 1 1

Index Scan using shopify_orders_2016_01_12_ix_shop_id_created_at on shopify_orders_2016_01_12 o_9 (cost=0.42..33.08 rows=31 width=606) (actual time=1.579..1.580 rows=1 loops=1)

  • Index Cond: ((shop_id = 164) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
  • Filter: (test IS NOT TRUE)
32. 3,029.921 3,029.921 ↑ 61.0 2 7,789

Index Scan using index_shopify_line_items_on_shopify_order_id_2 on shopify_line_items l (cost=0.56..105.29 rows=122 width=219) (actual time=0.379..0.389 rows=2 loops=7,789)

  • Index Cond: (shopify_order_id = o.id)
33. 0.291 2,241.717 ↓ 1.5 499 1

Subquery Scan on *SELECT* 2 (cost=0.99..56,179.52 rows=323 width=1,069) (actual time=1,131.112..2,241.717 rows=499 loops=1)

34. 0.723 2,241.426 ↓ 1.5 499 1

Nested Loop (cost=0.99..56,170.64 rows=323 width=1,041) (actual time=1,131.106..2,241.426 rows=499 loops=1)

35. 0.000 2,145.394 ↓ 1.5 499 1

Nested Loop (cost=0.99..46,496.28 rows=323 width=176) (actual time=1,131.056..2,145.394 rows=499 loops=1)

36. 1,007.316 1,007.316 ↓ 1.1 17,548 1

Index Scan using index_shopify_line_items_on_shop_id_2 on shopify_line_items l_1 (cost=0.56..15,314.04 rows=16,194 width=148) (actual time=0.551..1,007.316 rows=17,548 loops=1)

  • Index Cond: (shop_id = 164)
37. 1,140.620 1,140.620 ↓ 0.0 0 17,548

Index Scan using index_shopify_refund_line_items_on_shopify_line_item_id on shopify_refund_line_items rl (cost=0.43..1.92 rows=1 width=36) (actual time=0.065..0.065 rows=0 loops=17,548)

  • Index Cond: (shopify_line_item_id = l_1.id)
  • Filter: ((created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 0
38. 0.998 95.309 ↑ 16.0 1 499

Append (cost=0.00..29.77 rows=16 width=83) (actual time=0.053..0.191 rows=1 loops=499)

39. 0.000 0.000 ↓ 0.0 0 499

Seq Scan on shopify_orders o_10 (cost=0.00..0.00 rows=1 width=80) (actual time=0.000..0.000 rows=0 loops=499)

  • Filter: ((test IS NOT TRUE) AND (l_1.shopify_order_id = id))
40. 2.994 2.994 ↓ 0.0 0 499

Index Scan using shopify_orders_2019_01_03_pkey on shopify_orders_2019_01_03 o_11 (cost=0.42..1.96 rows=1 width=83) (actual time=0.006..0.006 rows=0 loops=499)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
41. 4.491 4.491 ↓ 0.0 0 499

Index Scan using shopify_orders_2019_03_06_pkey on shopify_orders_2019_03_06 o_12 (cost=0.43..2.09 rows=1 width=95) (actual time=0.009..0.009 rows=0 loops=499)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
42. 6.986 6.986 ↓ 0.0 0 499

Index Scan using shopify_orders_2019_06_09_pkey on shopify_orders_2019_06_09 o_13 (cost=0.43..2.16 rows=1 width=85) (actual time=0.014..0.014 rows=0 loops=499)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
43. 7.485 7.485 ↓ 0.0 0 499

Index Scan using shopify_orders_2019_09_12_pkey on shopify_orders_2019_09_12 o_14 (cost=0.43..2.23 rows=1 width=82) (actual time=0.015..0.015 rows=0 loops=499)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
44. 18.962 18.962 ↓ 0.0 0 499

Index Scan using shopify_orders_2018_01_06_pkey on shopify_orders_2018_01_06 o_15 (cost=0.42..2.01 rows=1 width=75) (actual time=0.038..0.038 rows=0 loops=499)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
45. 12.974 12.974 ↓ 0.0 0 499

Index Scan using shopify_orders_2018_06_12_pkey on shopify_orders_2018_06_12 o_16 (cost=0.43..2.10 rows=1 width=79) (actual time=0.026..0.026 rows=0 loops=499)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
46. 1.497 1.497 ↓ 0.0 0 499

Index Scan using shopify_orders_2017_01_06_pkey on shopify_orders_2017_01_06 o_17 (cost=0.42..1.88 rows=1 width=72) (actual time=0.003..0.003 rows=0 loops=499)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
47. 33.433 33.433 ↑ 1.0 1 499

Index Scan using shopify_orders_2017_06_12_pkey on shopify_orders_2017_06_12 o_18 (cost=0.43..2.01 rows=1 width=73) (actual time=0.065..0.067 rows=1 loops=499)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
48. 0.499 0.499 ↓ 0.0 0 499

Index Scan using shopify_orders_2016_01_12_pkey on shopify_orders_2016_01_12 o_19 (cost=0.42..1.89 rows=1 width=71) (actual time=0.001..0.001 rows=0 loops=499)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
49. 0.499 0.499 ↓ 0.0 0 499

Index Scan using shopify_orders_2015_01_12_pkey on shopify_orders_2015_01_12 o_20 (cost=0.42..1.66 rows=1 width=71) (actual time=0.001..0.001 rows=0 loops=499)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
50. 0.499 0.499 ↓ 0.0 0 499

Index Scan using shopify_orders_2014_01_12_pkey on shopify_orders_2014_01_12 o_21 (cost=0.41..1.64 rows=1 width=70) (actual time=0.001..0.001 rows=0 loops=499)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
51. 0.499 0.499 ↓ 0.0 0 499

Index Scan using shopify_orders_2013_pkey on shopify_orders_2013 o_22 (cost=0.41..1.61 rows=1 width=70) (actual time=0.001..0.001 rows=0 loops=499)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
52. 0.998 0.998 ↓ 0.0 0 499

Index Scan using shopify_orders_shopify_orders_2020_01_03_pkey on shopify_orders_2020_01_03 o_23 (cost=0.43..2.14 rows=1 width=83) (actual time=0.002..0.002 rows=0 loops=499)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
53. 1.497 1.497 ↓ 0.0 0 499

Index Scan using shopify_orders_2020_03_06_pkey on shopify_orders_2020_03_06 o_24 (cost=0.43..2.25 rows=1 width=86) (actual time=0.003..0.003 rows=0 loops=499)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
54. 0.998 0.998 ↓ 0.0 0 499

Index Scan using shopify_orders_shopify_orders_2020_06_09_pkey on shopify_orders_2020_06_09 o_25 (cost=0.43..2.04 rows=1 width=83) (actual time=0.002..0.002 rows=0 loops=499)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
55. 0.148 71.708 ↓ 4.4 309 1

Subquery Scan on *SELECT* 3 (cost=0.42..2,764.58 rows=71 width=1,157) (actual time=2.962..71.708 rows=309 loops=1)

56. 0.324 71.560 ↓ 4.4 309 1

Nested Loop (cost=0.42..2,762.45 rows=71 width=1,125) (actual time=2.955..71.560 rows=309 loops=1)

57. 31.993 31.993 ↓ 4.4 309 1

Index Scan using index_shopify_order_adjustments_on_shop_id on shopify_order_adjustments a (cost=0.42..149.79 rows=71 width=48) (actual time=2.908..31.993 rows=309 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 13
58. 0.309 39.243 ↑ 16.0 1 309

Append (cost=0.00..36.63 rows=16 width=83) (actual time=0.022..0.127 rows=1 loops=309)

59. 0.000 0.000 ↓ 0.0 0 309

Seq Scan on shopify_orders o_26 (cost=0.00..0.00 rows=1 width=80) (actual time=0.000..0.000 rows=0 loops=309)

  • Filter: ((test IS NOT TRUE) AND (a.shopify_order_id = id))
60. 0.309 0.309 ↓ 0.0 0 309

Index Scan using shopify_orders_2019_01_03_pkey on shopify_orders_2019_01_03 o_27 (cost=0.42..2.44 rows=1 width=83) (actual time=0.001..0.001 rows=0 loops=309)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (test IS NOT TRUE)
61. 4.017 4.017 ↓ 0.0 0 309

Index Scan using shopify_orders_2019_03_06_pkey on shopify_orders_2019_03_06 o_28 (cost=0.43..2.45 rows=1 width=95) (actual time=0.013..0.013 rows=0 loops=309)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (test IS NOT TRUE)
62. 4.944 4.944 ↓ 0.0 0 309

Index Scan using shopify_orders_2019_06_09_pkey on shopify_orders_2019_06_09 o_29 (cost=0.43..2.45 rows=1 width=85) (actual time=0.016..0.016 rows=0 loops=309)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (test IS NOT TRUE)
63. 4.944 4.944 ↓ 0.0 0 309

Index Scan using shopify_orders_2019_09_12_pkey on shopify_orders_2019_09_12 o_30 (cost=0.43..2.45 rows=1 width=82) (actual time=0.016..0.016 rows=0 loops=309)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (test IS NOT TRUE)
64. 3.708 3.708 ↓ 0.0 0 309

Index Scan using shopify_orders_2018_01_06_pkey on shopify_orders_2018_01_06 o_31 (cost=0.42..2.44 rows=1 width=75) (actual time=0.012..0.012 rows=0 loops=309)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (test IS NOT TRUE)
65. 9.888 9.888 ↓ 0.0 0 309

Index Scan using shopify_orders_2018_06_12_pkey on shopify_orders_2018_06_12 o_32 (cost=0.43..2.45 rows=1 width=79) (actual time=0.032..0.032 rows=0 loops=309)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (test IS NOT TRUE)
66. 0.927 0.927 ↓ 0.0 0 309

Index Scan using shopify_orders_2017_01_06_pkey on shopify_orders_2017_01_06 o_33 (cost=0.42..2.44 rows=1 width=72) (actual time=0.003..0.003 rows=0 loops=309)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (test IS NOT TRUE)
67. 8.034 8.034 ↓ 0.0 0 309

Index Scan using shopify_orders_2017_06_12_pkey on shopify_orders_2017_06_12 o_34 (cost=0.43..2.45 rows=1 width=73) (actual time=0.025..0.026 rows=0 loops=309)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (test IS NOT TRUE)
68. 0.309 0.309 ↓ 0.0 0 309

Index Scan using shopify_orders_2016_01_12_pkey on shopify_orders_2016_01_12 o_35 (cost=0.42..2.44 rows=1 width=71) (actual time=0.001..0.001 rows=0 loops=309)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (test IS NOT TRUE)
69. 0.309 0.309 ↓ 0.0 0 309

Index Scan using shopify_orders_2015_01_12_pkey on shopify_orders_2015_01_12 o_36 (cost=0.42..2.41 rows=1 width=71) (actual time=0.001..0.001 rows=0 loops=309)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (test IS NOT TRUE)
70. 0.309 0.309 ↓ 0.0 0 309

Index Scan using shopify_orders_2014_01_12_pkey on shopify_orders_2014_01_12 o_37 (cost=0.41..2.40 rows=1 width=70) (actual time=0.001..0.001 rows=0 loops=309)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (test IS NOT TRUE)
71. 0.309 0.309 ↓ 0.0 0 309

Index Scan using shopify_orders_2013_pkey on shopify_orders_2013 o_38 (cost=0.41..2.40 rows=1 width=70) (actual time=0.001..0.001 rows=0 loops=309)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (test IS NOT TRUE)
72. 0.309 0.309 ↓ 0.0 0 309

Index Scan using shopify_orders_shopify_orders_2020_01_03_pkey on shopify_orders_2020_01_03 o_39 (cost=0.43..2.45 rows=1 width=83) (actual time=0.001..0.001 rows=0 loops=309)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (test IS NOT TRUE)
73. 0.309 0.309 ↓ 0.0 0 309

Index Scan using shopify_orders_2020_03_06_pkey on shopify_orders_2020_03_06 o_40 (cost=0.43..2.45 rows=1 width=86) (actual time=0.001..0.001 rows=0 loops=309)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (test IS NOT TRUE)
74. 0.309 0.309 ↓ 0.0 0 309

Index Scan using shopify_orders_shopify_orders_2020_06_09_pkey on shopify_orders_2020_06_09 o_41 (cost=0.43..2.45 rows=1 width=83) (actual time=0.001..0.001 rows=0 loops=309)

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (test IS NOT TRUE)
75. 3.015 557.579 ↓ 1.1 7,252 1

Subquery Scan on *SELECT* 4 (cost=33,595.05..33,897.43 rows=6,366 width=1,151) (actual time=550.081..557.579 rows=7,252 loops=1)

76. 9.142 554.564 ↓ 1.1 7,252 1

HashAggregate (cost=33,595.05..33,674.62 rows=6,366 width=1,111) (actual time=550.075..554.564 rows=7,252 loops=1)

  • Group Key: o_42.id
77. 5.486 545.422 ↓ 1.2 7,349 1

Nested Loop Left Join (cost=0.87..33,515.47 rows=6,366 width=109) (actual time=1.696..545.422 rows=7,349 loops=1)

78. 5.970 409.400 ↓ 1.1 7,252 1

Nested Loop (cost=0.43..21,578.19 rows=6,366 width=109) (actual time=1.383..409.400 rows=7,252 loops=1)

79. 0.631 6.191 ↓ 1.2 7,789 1

Append (cost=0.00..6,196.91 rows=6,366 width=94) (actual time=0.021..6.191 rows=7,789 loops=1)

80. 0.002 0.002 ↓ 0.0 0 1

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

  • Filter: ((test IS NOT TRUE) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone) AND (shop_id = 164))
81. 0.479 0.479 ↓ 3.0 592 1

Index Scan using shopify_orders_2019_01_03_on_shop_id on shopify_orders_2019_01_03 o_43 (cost=0.42..203.26 rows=198 width=99) (actual time=0.019..0.479 rows=592 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
82. 0.254 0.254 ↑ 1.2 383 1

Index Scan using shopify_orders_2019_03_06_on_shop_id on shopify_orders_2019_03_06 o_44 (cost=0.43..406.41 rows=445 width=111) (actual time=0.020..0.254 rows=383 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
83. 0.325 0.325 ↑ 1.5 509 1

Index Scan using shopify_orders_2019_06_09_on_shop_id on shopify_orders_2019_06_09 o_45 (cost=0.43..725.73 rows=752 width=101) (actual time=0.017..0.325 rows=509 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
84. 0.135 0.135 ↑ 1.9 139 1

Index Scan using shopify_orders_2019_09_12_ix_shop_id_created_at on shopify_orders_2019_09_12 o_46 (cost=0.56..282.65 rows=271 width=98) (actual time=0.016..0.135 rows=139 loops=1)

  • Index Cond: ((shop_id = 164) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
  • Filter: (test IS NOT TRUE)
85. 1.353 1.353 ↑ 1.2 1,277 1

Index Scan using shopify_orders_2018_01_06_on_shop_id on shopify_orders_2018_01_06 o_47 (cost=0.42..1,527.85 rows=1,582 width=91) (actual time=0.018..1.353 rows=1,277 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
86. 1.116 1.116 ↓ 3.4 1,865 1

Index Scan using shopify_orders_2018_06_12_on_shop_id on shopify_orders_2018_06_12 o_48 (cost=0.43..560.82 rows=544 width=95) (actual time=0.018..1.116 rows=1,865 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
87. 0.346 0.346 ↓ 1.3 479 1

Index Scan using shopify_orders_2017_01_06_on_shop_id on shopify_orders_2017_01_06 o_49 (cost=0.42..354.04 rows=356 width=88) (actual time=0.020..0.346 rows=479 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
88. 1.538 1.538 ↓ 1.2 2,544 1

Index Scan using shopify_orders_2017_06_12_on_shop_id on shopify_orders_2017_06_12 o_50 (cost=0.43..2,071.24 rows=2,186 width=89) (actual time=0.021..1.538 rows=2,544 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
89. 0.012 0.012 ↑ 31.0 1 1

Index Scan using shopify_orders_2016_01_12_ix_shop_id_created_at on shopify_orders_2016_01_12 o_51 (cost=0.42..33.08 rows=31 width=87) (actual time=0.011..0.012 rows=1 loops=1)

  • Index Cond: ((shop_id = 164) AND (created_at >= '2016-09-30 22:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
  • Filter: (test IS NOT TRUE)
90. 397.239 397.239 ↑ 1.0 1 7,789

Index Scan using index_shopify_shipping_lines_on_shopify_order_id on shopify_shipping_lines sl (cost=0.43..2.41 rows=1 width=24) (actual time=0.051..0.051 rows=1 loops=7,789)

  • Index Cond: (shopify_order_id = o_42.id)
91. 130.536 130.536 ↓ 0.0 0 7,252

Index Scan using index_shopify_shipping_tax_lines_on_shopify_shipping_line_id on shopify_shipping_tax_lines s (cost=0.43..1.84 rows=4 width=16) (actual time=0.018..0.018 rows=0 loops=7,252)

  • Index Cond: (sl.id = shopify_shipping_line_id)
92. 0.000 0.002 ↓ 0.0 0 1

Subquery Scan on *SELECT* 5 (cost=0.00..0.05 rows=1 width=1,164) (actual time=0.002..0.002 rows=0 loops=1)

93. 0.001 0.002 ↓ 0.0 0 1

HashAggregate (cost=0.00..0.01 rows=1 width=1,112) (actual time=0.002..0.002 rows=0 loops=1)

  • Group Key: id
94. 0.001 0.001 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=105) (actual time=0.001..0.001 rows=0 loops=1)

  • One-Time Filter: false
95. 1,793.755 1,793.755 ↑ 1.0 1 21,103

Index Only Scan using shopify_customers_pkey on shopify_customers sc (cost=0.56..1.06 rows=1 width=8) (actual time=0.085..0.085 rows=1 loops=21,103)

  • Index Cond: (id = "*SELECT* 1".shopify_customer_id)
  • Heap Fetches: 6,745
96. 343.959 869.255 ↓ 1.0 1,751,600 1

Hash (cost=167,293.02..167,293.02 rows=1,741,402 width=18) (actual time=869.254..869.255 rows=1,751,600 loops=1)

  • Buckets: 65,536 Batches: 32 Memory Usage: 3,443kB
97. 525.296 525.296 ↓ 1.0 1,751,600 1

Seq Scan on shopify_products p (cost=0.00..167,293.02 rows=1,741,402 width=18) (actual time=0.005..525.296 rows=1,751,600 loops=1)

98. 105.515 105.515 ↑ 1.0 1 21,103

Index Scan using shopify_customer_addresses_pkey on shopify_customer_addresses sa (cost=0.56..1.66 rows=1 width=22) (actual time=0.005..0.005 rows=1 loops=21,103)

  • Index Cond: ("*SELECT* 1".shipping_address_id = id)
99. 295.442 295.442 ↑ 1.0 1 21,103

Index Scan using shopify_customers_pkey on shopify_customers c (cost=0.56..1.52 rows=1 width=101) (actual time=0.014..0.014 rows=1 loops=21,103)

  • Index Cond: ("*SELECT* 1".shopify_customer_id = id)
Planning time : 33.055 ms
Execution time : 52,290.411 ms