explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CGON

Settings
# exclusive inclusive rows x rows loops node
1. 0.607 221,487.591 ↑ 1.0 500 1

Subquery Scan on final_tmp (cost=64,089,078,637.22..64,089,078,643.47 rows=500 width=2,204) (actual time=221,486.858..221,487.591 rows=500 loops=1)

2. 0.087 221,486.984 ↑ 1.0 500 1

Limit (cost=64,089,078,637.22..64,089,078,638.47 rows=500 width=2,208) (actual time=221,486.850..221,486.984 rows=500 loops=1)

3. 85.645 221,486.897 ↑ 25,976.3 500 1

Sort (cost=64,089,078,637.22..64,089,111,107.63 rows=12,988,163 width=2,208) (actual time=221,486.848..221,486.897 rows=500 loops=1)

  • Sort Key: tmp."Order Date", tmp.order_discr
  • Sort Method: top-N heapsort Memory: 631kB
4. 19.446 221,401.252 ↑ 615.9 21,089 1

Subquery Scan on tmp (cost=18,954,564,504.82..64,088,431,451.07 rows=12,988,163 width=2,208) (actual time=163,694.166..221,401.252 rows=21,089 loops=1)

  • Filter: (tmp.display_row = 1)
5. 57,201.485 221,381.806 ↑ 123,174.8 21,089 1

GroupAggregate (cost=18,954,564,504.82..64,055,961,043.19 rows=2,597,632,630 width=2,244) (actual time=163,694.135..221,381.806 rows=21,089 loops=1)

  • Group Key: (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, rp_order_date(sv.id))), 'MM-DD-YYYY'::text)), sv.email, sv.name, (order_cancelled_status(sv.id)), (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, sv.cancelled_at)), 'MM-DD-YYYY'::text)), (order_month(sv.id)), (order_day_only(sv.created_at)), sv.gift_card, sv.tags, sv.landing_site, sv.referring_site, sv.source_name, sv.cancel_reason, sv.buyer_accepts_marketing, sv.product_name, sv.title, sv.variant_title, sv.sku, p.product_type, (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, sv.created_at)), 'MM-DD-YYYY'::text)), (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, p.published_at)), 'MM-DD-YYYY'::text)), p.tags, (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, rp_fulfilled_date1(sv.shopify_fulfillment_id))), 'MM-DD-YYYY'::text)), (rp_taxes_included(sv.id)), (order_line_tax_title(sv.line_item_id, 0, sv.row_type, sv.id)), (order_line_tax_title(sv.line_item_id, 1, sv.row_type, sv.id)), rp_discount_code_titles.title_1, rp_discount_code_types.type_1, rp_discount_code_titles.title_2, rp_discount_code_types.type_2, sa.first_name, sa.last_name, sa.address1, sa.city, sa.zip, sa.country, sa.province, (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, rp_customer_first_order_date(sv.shopify_customer_id))), 'MM-DD-YYYY'::text)), (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, rp_customer_last_order_date(sv.shopify_customer_id))), 'MM-DD-YYYY'::text)), sa.name, c.last_name, 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.state, c.verified_email, (customer_city(sv.shopify_customer_id)), (customer_company(sv.shopify_customer_id)), (customer_province(sv.shopify_customer_id)), (customer_country(sv.shopify_customer_id)), (customer_zip(sv.shopify_customer_id)), sv.currency, (order_payment_gateway_names(sv.id)), (order_credit_card_company(sv.id)), (sales_payment_method(sv.id)), scd.accept_language
6. 5,766.838 164,180.321 ↑ 12,761.9 203,546 1

Sort (cost=18,954,564,504.82..18,961,058,586.39 rows=2,597,632,630 width=1,640) (actual time=163,673.210..164,180.321 rows=203,546 loops=1)

  • Sort Key: (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, rp_order_date(sv.id))), 'MM-DD-YYYY'::text)), sv.email, sv.name, (order_cancelled_status(sv.id)), (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, sv.cancelled_at)), 'MM-DD-YYYY'::text)), (order_month(sv.id)), (order_day_only(sv.created_at)), sv.gift_card, sv.tags, sv.landing_site, sv.referring_site, sv.source_name, sv.cancel_reason, sv.buyer_accepts_marketing, sv.product_name, sv.title, sv.variant_title, sv.sku, p.product_type, (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, sv.created_at)), 'MM-DD-YYYY'::text)), (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, p.published_at)), 'MM-DD-YYYY'::text)), p.tags, (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, rp_fulfilled_date1(sv.shopify_fulfillment_id))), 'MM-DD-YYYY'::text)), (rp_taxes_included(sv.id)), (order_line_tax_title(sv.line_item_id, 0, sv.row_type, sv.id)), (order_line_tax_title(sv.line_item_id, 1, sv.row_type, sv.id)), rp_discount_code_titles.title_1, rp_discount_code_types.type_1, rp_discount_code_titles.title_2, rp_discount_code_types.type_2, sa.first_name, sa.last_name, sa.address1, sa.city, sa.zip, sa.country, sa.province, (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, rp_customer_first_order_date(sv.shopify_customer_id))), 'MM-DD-YYYY'::text)), (to_char(timezone('Europe/Madrid'::text, timezone('utc'::text, rp_customer_last_order_date(sv.shopify_customer_id))), 'MM-DD-YYYY'::text)), sa.name, c.last_name, 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.state, c.verified_email, (customer_city(sv.shopify_customer_id)), (customer_company(sv.shopify_customer_id)), (customer_province(sv.shopify_customer_id)), (customer_country(sv.shopify_customer_id)), (customer_zip(sv.shopify_customer_id)), sv.currency, (order_payment_gateway_names(sv.id)), (order_credit_card_company(sv.id)), (sales_payment_method(sv.id)), scd.accept_language
  • Sort Method: external merge Disk: 160,576kB
7. 111,006.221 158,413.483 ↑ 12,761.9 203,546 1

Hash Left Join (cost=3,376,711.00..12,216,636,007.52 rows=2,597,632,630 width=1,640) (actual time=39,524.498..158,413.483 rows=203,546 loops=1)

  • Hash Cond: (sv.id = scd.shopify_order_id)
8. 37.250 9,858.533 ↑ 4,674.2 21,103 1

Nested Loop Left Join (cost=224,775.98..310,822,132.96 rows=98,640,125 width=988) (actual time=1,221.954..9,858.533 rows=21,103 loops=1)

9. 30.707 7,267.820 ↑ 934.8 21,103 1

Nested Loop Left Join (cost=224,775.73..63,235,418.96 rows=19,728,025 width=972) (actual time=1,221.655..7,267.820 rows=21,103 loops=1)

10. 17.595 4,704.753 ↑ 187.0 21,103 1

Nested Loop Left Join (cost=224,775.48..13,718,075.96 rows=3,945,605 width=908) (actual time=1,221.355..4,704.753 rows=21,103 loops=1)

11. 41.624 1,985.974 ↑ 37.4 21,103 1

Nested Loop Left Join (cost=224,775.23..3,814,607.16 rows=789,121 width=844) (actual time=1,220.336..1,985.974 rows=21,103 loops=1)

12. 31.317 1,859.938 ↑ 37.4 21,103 1

Nested Loop Left Join (cost=224,774.67..2,562,260.98 rows=789,121 width=778) (actual time=1,220.320..1,859.938 rows=21,103 loops=1)

13. 266.187 1,744.209 ↑ 37.4 21,103 1

Hash Left Join (cost=224,774.11..1,222,039.80 rows=789,121 width=704) (actual time=1,220.305..1,744.209 rows=21,103 loops=1)

  • Hash Cond: (sv.shopify_product_id = p.id)
14. 7.201 264.871 ↑ 37.4 21,103 1

Subquery Scan on sv (cost=0.56..842,345.81 rows=789,121 width=582) (actual time=0.059..264.871 rows=21,103 loops=1)

15. 3.102 257.670 ↑ 37.4 21,103 1

Append (cost=0.56..834,454.60 rows=789,121 width=1,259) (actual time=0.058..257.670 rows=21,103 loops=1)

16. 10.266 254.564 ↑ 37.4 21,103 1

Result (cost=0.56..830,508.95 rows=789,120 width=1,259) (actual time=0.057..254.564 rows=21,103 loops=1)

17. 2.775 244.298 ↑ 37.4 21,103 1

Append (cost=0.56..818,672.15 rows=789,120 width=1,251) (actual time=0.054..244.298 rows=21,103 loops=1)

18. 4.941 133.621 ↑ 57.8 13,542 1

Result (cost=0.56..777,761.41 rows=782,638 width=1,251) (actual time=0.054..133.621 rows=13,542 loops=1)

19. 1.334 128.680 ↑ 57.8 13,542 1

Append (cost=0.56..767,978.44 rows=782,638 width=1,247) (actual time=0.051..128.680 rows=13,542 loops=1)

20. 4.895 57.936 ↑ 60.0 13,043 1

Subquery Scan on *SELECT* 1 (cost=0.56..707,795.83 rows=782,312 width=1,008) (actual time=0.051..57.936 rows=13,043 loops=1)

21. 12.354 53.041 ↑ 60.0 13,043 1

Nested Loop (cost=0.56..698,016.93 rows=782,312 width=1,004) (actual time=0.048..53.041 rows=13,043 loops=1)

22. 0.812 9.531 ↓ 1.2 7,789 1

Append (cost=0.00..6,242.00 rows=6,409 width=649) (actual time=0.031..9.531 rows=7,789 loops=1)

23. 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 >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone) AND (shop_id = 164))
24. 0.507 0.507 ↓ 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=0.029..0.507 rows=592 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
25. 0.459 0.459 ↑ 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.039..0.459 rows=383 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
26. 0.630 0.630 ↑ 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=0.039..0.630 rows=509 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
27. 0.231 0.231 ↑ 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=0.021..0.231 rows=139 loops=1)

  • Index Cond: ((shop_id = 164) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
  • Filter: (test IS NOT TRUE)
28. 1.628 1.628 ↑ 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.029..1.628 rows=1,277 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
29. 1.664 1.664 ↓ 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.020..1.664 rows=1,865 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
30. 0.596 0.596 ↓ 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=0.030..0.596 rows=479 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
31. 2.973 2.973 ↓ 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=0.020..2.973 rows=2,544 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
32. 0.018 0.018 ↑ 71.0 1 1

Index Scan using shopify_orders_2016_01_12_on_shop_id on shopify_orders_2016_01_12 o_9 (cost=0.42..73.85 rows=71 width=606) (actual time=0.017..0.018 rows=1 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
33. 0.011 0.011 ↓ 0.0 0 1

Index Scan using shopify_orders_2015_01_12_ix_shop_id_created_at on shopify_orders_2015_01_12 o_10 (cost=0.42..4.11 rows=3 width=596) (actual time=0.010..0.011 rows=0 loops=1)

  • Index Cond: ((shop_id = 164) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
  • Filter: (test IS NOT TRUE)
34. 31.156 31.156 ↑ 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.19 rows=122 width=219) (actual time=0.004..0.004 rows=2 loops=7,789)

  • Index Cond: (shopify_order_id = o.id)
35. 0.345 69.410 ↓ 1.5 499 1

Subquery Scan on *SELECT* 2 (cost=0.99..56,269.41 rows=326 width=1,069) (actual time=10.485..69.410 rows=499 loops=1)

36. 0.846 69.065 ↓ 1.5 499 1

Nested Loop (cost=0.99..56,260.45 rows=326 width=1,041) (actual time=10.476..69.065 rows=499 loops=1)

37. 2.239 51.253 ↓ 1.5 499 1

Nested Loop (cost=0.99..46,496.28 rows=326 width=176) (actual time=10.379..51.253 rows=499 loops=1)

38. 13.918 13.918 ↓ 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.021..13.918 rows=17,548 loops=1)

  • Index Cond: (shop_id = 164)
39. 35.096 35.096 ↓ 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.002..0.002 rows=0 loops=17,548)

  • Index Cond: (shopify_line_item_id = l_1.id)
  • Filter: ((created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 0
40. 2.495 16.966 ↑ 16.0 1 499

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

41. 0.000 0.000 ↓ 0.0 0 499

Seq Scan on shopify_orders o_11 (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))
42. 0.998 0.998 ↓ 0.0 0 499

Index Scan using shopify_orders_2019_01_03_pkey on shopify_orders_2019_01_03 o_12 (cost=0.42..1.96 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)
43. 0.998 0.998 ↓ 0.0 0 499

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Index Scan using shopify_orders_2016_01_12_pkey on shopify_orders_2016_01_12 o_20 (cost=0.42..1.89 rows=1 width=71) (actual time=0.002..0.002 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_2015_01_12_pkey on shopify_orders_2015_01_12 o_21 (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)
52. 0.998 0.998 ↓ 0.0 0 499

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

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

Index Scan using shopify_orders_2013_pkey on shopify_orders_2013 o_23 (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)
54. 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_24 (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)
55. 0.998 0.998 ↓ 0.0 0 499

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

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
56. 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_26 (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)
57. 0.440 14.869 ↓ 4.2 309 1

Subquery Scan on *SELECT* 3 (cost=0.42..2,838.40 rows=73 width=1,157) (actual time=0.089..14.869 rows=309 loops=1)

58. 0.986 14.429 ↓ 4.2 309 1

Nested Loop (cost=0.42..2,836.21 rows=73 width=1,125) (actual time=0.079..14.429 rows=309 loops=1)

59. 0.465 0.465 ↓ 4.2 309 1

Index Scan using index_shopify_order_adjustments_on_shop_id on shopify_order_adjustments a (cost=0.42..149.79 rows=73 width=48) (actual time=0.023..0.465 rows=309 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 13
60. 2.472 12.978 ↑ 16.0 1 309

Append (cost=0.00..36.64 rows=16 width=83) (actual time=0.020..0.042 rows=1 loops=309)

61. 0.000 0.000 ↓ 0.0 0 309

Seq Scan on shopify_orders o_27 (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))
62. 0.618 0.618 ↓ 0.0 0 309

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

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

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

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

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

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

Index Scan using shopify_orders_2019_09_12_pkey on shopify_orders_2019_09_12 o_31 (cost=0.43..2.45 rows=1 width=82) (actual time=0.002..0.002 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_2018_01_06_pkey on shopify_orders_2018_01_06 o_32 (cost=0.42..2.44 rows=1 width=75) (actual time=0.003..0.003 rows=0 loops=309)

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

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

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

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

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

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

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

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

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

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

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

Index Scan using shopify_orders_2014_01_12_pkey on shopify_orders_2014_01_12 o_38 (cost=0.41..2.41 rows=1 width=70) (actual time=0.002..0.002 rows=0 loops=309)

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

Index Scan using shopify_orders_2013_pkey on shopify_orders_2013 o_39 (cost=0.41..2.41 rows=1 width=70) (actual time=0.002..0.002 rows=0 loops=309)

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

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

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

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

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

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

  • Index Cond: (id = a.shopify_order_id)
  • Filter: (test IS NOT TRUE)
77. 10.240 93.033 ↓ 1.1 7,252 1

Subquery Scan on *SELECT* 4 (cost=33,822.30..34,126.73 rows=6,409 width=1,151) (actual time=63.642..93.033 rows=7,252 loops=1)

78. 25.136 82.793 ↓ 1.1 7,252 1

HashAggregate (cost=33,822.30..33,902.41 rows=6,409 width=1,111) (actual time=63.632..82.793 rows=7,252 loops=1)

  • Group Key: o_43.id
79. 3.938 57.657 ↓ 1.1 7,349 1

Nested Loop Left Join (cost=0.87..33,742.19 rows=6,409 width=109) (actual time=0.058..57.657 rows=7,349 loops=1)

80. 6.160 39.215 ↓ 1.1 7,252 1

Nested Loop (cost=0.43..21,724.17 rows=6,409 width=109) (actual time=0.046..39.215 rows=7,252 loops=1)

81. 0.834 9.688 ↓ 1.2 7,789 1

Append (cost=0.00..6,242.00 rows=6,409 width=94) (actual time=0.030..9.688 rows=7,789 loops=1)

82. 0.003 0.003 ↓ 0.0 0 1

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

  • Filter: ((test IS NOT TRUE) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone) AND (shop_id = 164))
83. 0.655 0.655 ↓ 3.0 592 1

Index Scan using shopify_orders_2019_01_03_on_shop_id on shopify_orders_2019_01_03 o_44 (cost=0.42..203.26 rows=198 width=99) (actual time=0.026..0.655 rows=592 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
84. 0.403 0.403 ↑ 1.2 383 1

Index Scan using shopify_orders_2019_03_06_on_shop_id on shopify_orders_2019_03_06 o_45 (cost=0.43..406.41 rows=445 width=111) (actual time=0.026..0.403 rows=383 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
85. 0.574 0.574 ↑ 1.5 509 1

Index Scan using shopify_orders_2019_06_09_on_shop_id on shopify_orders_2019_06_09 o_46 (cost=0.43..725.73 rows=752 width=101) (actual time=0.024..0.574 rows=509 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
86. 0.204 0.204 ↑ 1.9 139 1

Index Scan using shopify_orders_2019_09_12_ix_shop_id_created_at on shopify_orders_2019_09_12 o_47 (cost=0.56..282.65 rows=271 width=98) (actual time=0.018..0.204 rows=139 loops=1)

  • Index Cond: ((shop_id = 164) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
  • Filter: (test IS NOT TRUE)
87. 1.871 1.871 ↑ 1.2 1,277 1

Index Scan using shopify_orders_2018_01_06_on_shop_id on shopify_orders_2018_01_06 o_48 (cost=0.42..1,527.85 rows=1,582 width=91) (actual time=0.029..1.871 rows=1,277 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
88. 1.939 1.939 ↓ 3.4 1,865 1

Index Scan using shopify_orders_2018_06_12_on_shop_id on shopify_orders_2018_06_12 o_49 (cost=0.43..560.82 rows=544 width=95) (actual time=0.022..1.939 rows=1,865 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
89. 0.539 0.539 ↓ 1.3 479 1

Index Scan using shopify_orders_2017_01_06_on_shop_id on shopify_orders_2017_01_06 o_50 (cost=0.42..354.04 rows=356 width=88) (actual time=0.026..0.539 rows=479 loops=1)

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

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

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
91. 0.013 0.013 ↑ 71.0 1 1

Index Scan using shopify_orders_2016_01_12_on_shop_id on shopify_orders_2016_01_12 o_52 (cost=0.42..73.85 rows=71 width=87) (actual time=0.013..0.013 rows=1 loops=1)

  • Index Cond: (shop_id = 164)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
92. 0.011 0.011 ↓ 0.0 0 1

Index Scan using shopify_orders_2015_01_12_ix_shop_id_created_at on shopify_orders_2015_01_12 o_53 (cost=0.42..4.11 rows=3 width=87) (actual time=0.011..0.011 rows=0 loops=1)

  • Index Cond: ((shop_id = 164) AND (created_at >= '2015-10-31 23:00:00'::timestamp without time zone) AND (created_at <= '2019-09-30 21:59:59'::timestamp without time zone))
  • Filter: (test IS NOT TRUE)
93. 23.367 23.367 ↑ 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.003..0.003 rows=1 loops=7,789)

  • Index Cond: (shopify_order_id = o_43.id)
94. 14.504 14.504 ↓ 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.002..0.002 rows=0 loops=7,252)

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

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

96. 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
97. 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
98. 665.455 1,213.151 ↓ 1.0 1,751,585 1

Hash (cost=167,293.02..167,293.02 rows=1,741,402 width=138) (actual time=1,213.151..1,213.151 rows=1,751,585 loops=1)

  • Buckets: 32,768 Batches: 128 Memory Usage: 2,578kB
99. 547.696 547.696 ↓ 1.0 1,751,585 1

Seq Scan on shopify_products p (cost=0.00..167,293.02 rows=1,741,402 width=138) (actual time=0.004..547.696 rows=1,751,585 loops=1)

100. 84.412 84.412 ↑ 1.0 1 21,103

Index Scan using shopify_customer_addresses_pkey on shopify_customer_addresses sa (cost=0.56..1.70 rows=1 width=90) (actual time=0.004..0.004 rows=1 loops=21,103)

  • Index Cond: (sv.shipping_address_id = id)
101. 84.412 84.412 ↑ 1.0 1 21,103

Index Scan using shopify_customers_pkey on shopify_customers c (cost=0.56..1.59 rows=1 width=66) (actual time=0.004..0.004 rows=1 loops=21,103)

  • Index Cond: (sv.shopify_customer_id = id)
102. 2,701.184 2,701.184 ↓ 0.0 0 21,103

Function Scan on rp_discount_code_titles (cost=0.25..12.75 rows=5 width=72) (actual time=0.128..0.128 rows=0 loops=21,103)

  • Filter: (shopify_order_id = sv.id)
103. 2,532.360 2,532.360 ↓ 0.0 0 21,103

Function Scan on rp_discount_code_types (cost=0.25..12.75 rows=5 width=72) (actual time=0.120..0.120 rows=0 loops=21,103)

  • Filter: (shopify_order_id = sv.id)
104. 2,553.463 2,553.463 ↓ 0.0 0 21,103

Function Scan on rp_discount_code_amount (cost=0.25..12.75 rows=5 width=24) (actual time=0.121..0.121 rows=0 loops=21,103)

  • Filter: (shopify_order_id = sv.id)
105. 15,566.058 37,548.729 ↑ 1.0 51,357,054 1

Hash (cost=2,147,125.12..2,147,125.12 rows=51,965,912 width=27) (actual time=37,548.728..37,548.729 rows=51,357,054 loops=1)

  • Buckets: 65,536 Batches: 1,024 Memory Usage: 3,467kB
106. 21,982.671 21,982.671 ↑ 1.0 51,357,054 1

Seq Scan on shopify_client_details scd (cost=0.00..2,147,125.12 rows=51,965,912 width=27) (actual time=0.022..21,982.671 rows=51,357,054 loops=1)

Planning time : 23.206 ms
Execution time : 221,520.674 ms