explain.depesz.com

PostgreSQL's explain analyze made readable

Result: r9D8 : test

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 12.314 ↓ 0.0 0 1

Limit (cost=560.35..560.35 rows=1 width=196) (actual time=12.314..12.314 rows=0 loops=1)

2. 0.010 12.312 ↓ 0.0 0 1

Sort (cost=560.35..560.35 rows=1 width=196) (actual time=12.312..12.312 rows=0 loops=1)

  • Sort Key: tmp."Order Name", tmp.order_discr
  • Sort Method: quicksort Memory: 25kB
3. 0.001 12.302 ↓ 0.0 0 1

Subquery Scan on tmp (cost=559.91..560.34 rows=1 width=196) (actual time=12.301..12.302 rows=0 loops=1)

4. 0.002 12.301 ↓ 0.0 0 1

GroupAggregate (cost=559.91..560.33 rows=1 width=232) (actual time=12.301..12.301 rows=0 loops=1)

  • Group Key: sv.name, (to_char(timezone('America/New_York'::text, timezone('utc'::text, sv.created_at)), 'MM-DD-YYYY'::text)), sv.email
  • Filter: (CASE WHEN ((GROUPING(sv.name) = 0) AND (GROUPING((to_char(timezone('America/New_York'::text, timezone('utc'::text, sv.created_at)), 'MM-DD-YYYY'::text))) = 0) AND (GROUPING(sv.email) = 0)) THEN 1 ELSE 0 END = 1)
5. 0.010 12.299 ↓ 0.0 0 1

Sort (cost=559.91..559.93 rows=7 width=108) (actual time=12.299..12.299 rows=0 loops=1)

  • Sort Key: sv.name, (to_char(timezone('America/New_York'::text, timezone('utc'::text, sv.created_at)), 'MM-DD-YYYY'::text)), sv.email
  • Sort Method: quicksort Memory: 25kB
6. 0.000 12.289 ↓ 0.0 0 1

Subquery Scan on sv (cost=0.42..559.81 rows=7 width=108) (actual time=12.289..12.289 rows=0 loops=1)

7. 0.001 12.289 ↓ 0.0 0 1

Append (cost=0.42..559.69 rows=7 width=1,223) (actual time=12.289..12.289 rows=0 loops=1)

8. 0.001 12.262 ↓ 0.0 0 1

Result (cost=0.42..532.19 rows=5 width=1,223) (actual time=12.262..12.262 rows=0 loops=1)

9. 0.001 12.261 ↓ 0.0 0 1

Append (cost=0.42..532.12 rows=5 width=1,215) (actual time=12.261..12.261 rows=0 loops=1)

10. 0.000 11.011 ↓ 0.0 0 1

Result (cost=0.42..261.16 rows=4 width=1,215) (actual time=11.011..11.011 rows=0 loops=1)

11. 0.001 11.011 ↓ 0.0 0 1

Append (cost=0.42..261.11 rows=4 width=1,211) (actual time=11.011..11.011 rows=0 loops=1)

12. 0.000 0.039 ↓ 0.0 0 1

Subquery Scan on *SELECT* 1 (cost=0.42..26.78 rows=3 width=999) (actual time=0.039..0.039 rows=0 loops=1)

13. 0.001 0.039 ↓ 0.0 0 1

Nested Loop (cost=0.42..26.75 rows=3 width=995) (actual time=0.038..0.039 rows=0 loops=1)

14. 0.002 0.038 ↓ 0.0 0 1

Append (cost=0.00..9.84 rows=2 width=644) (actual time=0.038..0.038 rows=0 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-08-01 04:00:00'::timestamp without time zone) AND (created_at <= '2019-08-15 03:59:59'::timestamp without time zone) AND (shop_id = 1))
16. 0.034 0.034 ↓ 0.0 0 1

Index Scan using shopify_orders_2019_06_09_on_shop_id on shopify_orders_2019_06_09 o_1 (cost=0.29..9.83 rows=1 width=643) (actual time=0.034..0.034 rows=0 loops=1)

  • Index Cond: (shop_id = 1)
  • Filter: ((created_at >= '2019-08-01 04:00:00'::timestamp without time zone) AND (created_at <= '2019-08-15 03:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 5
17. 0.000 0.000 ↓ 0.0 0

Index Scan using index_shopify_line_items_on_shopify_order_id on shopify_line_items l (cost=0.42..8.44 rows=1 width=276) (never executed)

  • Index Cond: (shopify_order_id = o.id)
18. 0.001 10.971 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=0.71..234.31 rows=1 width=1,166) (actual time=10.971..10.971 rows=0 loops=1)

19. 0.004 10.970 ↓ 0.0 0 1

Nested Loop (cost=0.71..234.29 rows=1 width=1,158) (actual time=10.970..10.970 rows=0 loops=1)

20. 0.012 10.489 ↑ 8.0 3 1

Nested Loop (cost=0.42..214.38 rows=24 width=203) (actual time=6.903..10.489 rows=3 loops=1)

21. 0.005 1.442 ↑ 3.2 5 1

Append (cost=0.00..79.18 rows=16 width=39) (actual time=0.026..1.442 rows=5 loops=1)

22. 0.003 0.003 ↓ 0.0 0 1

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

  • Filter: (shop_id = 1)
23. 0.005 0.005 ↓ 0.0 0 1

Index Scan using shopify_orders_2019_01_03_on_shop_id on shopify_orders_2019_01_03 o_3 (cost=0.29..8.30 rows=1 width=34) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: (shop_id = 1)
24. 0.011 0.011 ↓ 0.0 0 1

Index Scan using shopify_orders_2019_03_06_on_shop_id on shopify_orders_2019_03_06 o_4 (cost=0.29..4.56 rows=1 width=34) (actual time=0.011..0.011 rows=0 loops=1)

  • Index Cond: (shop_id = 1)
25. 0.017 0.017 ↓ 1.2 5 1

Index Scan using shopify_orders_2019_06_09_on_shop_id on shopify_orders_2019_06_09 o_5 (cost=0.29..9.81 rows=4 width=33) (actual time=0.007..0.017 rows=5 loops=1)

  • Index Cond: (shop_id = 1)
26. 0.018 0.018 ↓ 0.0 0 1

Index Scan using shopify_orders_2019_09_12_on_shop_id on shopify_orders_2019_09_12 o_6 (cost=0.29..6.04 rows=1 width=34) (actual time=0.018..0.018 rows=0 loops=1)

  • Index Cond: (shop_id = 1)
27. 0.010 0.010 ↓ 0.0 0 1

Index Scan using shopify_orders_2018_01_06_on_shop_id on shopify_orders_2018_01_06 o_7 (cost=0.29..4.35 rows=1 width=32) (actual time=0.009..0.010 rows=0 loops=1)

  • Index Cond: (shop_id = 1)
28. 0.801 0.801 ↓ 0.0 0 1

Index Scan using shopify_orders_2018_06_12_on_shop_id on shopify_orders_2018_06_12 o_8 (cost=0.29..4.93 rows=1 width=32) (actual time=0.801..0.801 rows=0 loops=1)

  • Index Cond: (shop_id = 1)
29. 0.267 0.267 ↓ 0.0 0 1

Index Scan using shopify_orders_2017_01_06_on_shop_id on shopify_orders_2017_01_06 o_9 (cost=0.14..4.16 rows=1 width=34) (actual time=0.266..0.267 rows=0 loops=1)

  • Index Cond: (shop_id = 1)
30. 0.281 0.281 ↓ 0.0 0 1

Index Scan using shopify_orders_2017_06_12_on_shop_id on shopify_orders_2017_06_12 o_10 (cost=0.29..4.32 rows=1 width=29) (actual time=0.280..0.281 rows=0 loops=1)

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

Index Scan using shopify_orders_2016_01_12_on_shop_id on shopify_orders_2016_01_12 o_11 (cost=0.14..8.16 rows=1 width=56) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: (shop_id = 1)
32. 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_12 (cost=0.14..8.16 rows=1 width=56) (actual time=0.005..0.005 rows=0 loops=1)

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

Index Scan using shopify_orders_2014_01_12_on_shop_id on shopify_orders_2014_01_12 o_13 (cost=0.14..8.16 rows=1 width=56) (actual time=0.005..0.005 rows=0 loops=1)

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

Index Scan using shopify_orders_2013_on_shop_id on shopify_orders_2013 o_14 (cost=0.14..8.16 rows=1 width=56) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: (shop_id = 1)
35. 9.035 9.035 ↑ 1.0 1 5

Index Scan using index_shopify_line_items_on_shopify_order_id on shopify_line_items l_1 (cost=0.42..8.44 rows=1 width=172) (actual time=1.806..1.807 rows=1 loops=5)

  • Index Cond: (shopify_order_id = o_2.id)
36. 0.477 0.477 ↓ 0.0 0 3

Index Scan using index_shopify_refund_line_items_on_shopify_line_item_id on shopify_refund_line_items rl (cost=0.29..0.82 rows=1 width=44) (actual time=0.159..0.159 rows=0 loops=3)

  • Index Cond: (shopify_line_item_id = l_1.id)
  • Filter: ((created_at >= '2019-08-01 04:00:00'::timestamp without time zone) AND (created_at <= '2019-08-15 03:59:59'::timestamp without time zone))
37. 0.001 1.249 ↓ 0.0 0 1

Subquery Scan on *SELECT* 3 (cost=4.30..270.93 rows=1 width=1,198) (actual time=1.249..1.249 rows=0 loops=1)

38. 0.007 1.248 ↓ 0.0 0 1

Nested Loop (cost=4.30..270.92 rows=1 width=1,190) (actual time=1.248..1.248 rows=0 loops=1)

39. 0.006 0.336 ↑ 3.2 5 1

Append (cost=0.00..79.18 rows=16 width=39) (actual time=0.026..0.336 rows=5 loops=1)

40. 0.005 0.005 ↓ 0.0 0 1

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

  • Filter: (shop_id = 1)
41. 0.006 0.006 ↓ 0.0 0 1

Index Scan using shopify_orders_2019_01_03_on_shop_id on shopify_orders_2019_01_03 o_16 (cost=0.29..8.30 rows=1 width=34) (actual time=0.006..0.006 rows=0 loops=1)

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

Index Scan using shopify_orders_2019_03_06_on_shop_id on shopify_orders_2019_03_06 o_17 (cost=0.29..4.56 rows=1 width=34) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: (shop_id = 1)
43. 0.016 0.016 ↓ 1.2 5 1

Index Scan using shopify_orders_2019_06_09_on_shop_id on shopify_orders_2019_06_09 o_18 (cost=0.29..9.81 rows=4 width=33) (actual time=0.009..0.016 rows=5 loops=1)

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

Index Scan using shopify_orders_2019_09_12_on_shop_id on shopify_orders_2019_09_12 o_19 (cost=0.29..6.04 rows=1 width=34) (actual time=0.007..0.007 rows=0 loops=1)

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

Index Scan using shopify_orders_2018_01_06_on_shop_id on shopify_orders_2018_01_06 o_20 (cost=0.29..4.35 rows=1 width=32) (actual time=0.006..0.006 rows=0 loops=1)

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

Index Scan using shopify_orders_2018_06_12_on_shop_id on shopify_orders_2018_06_12 o_21 (cost=0.29..4.93 rows=1 width=32) (actual time=0.005..0.005 rows=0 loops=1)

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

Index Scan using shopify_orders_2017_01_06_on_shop_id on shopify_orders_2017_01_06 o_22 (cost=0.14..4.16 rows=1 width=34) (actual time=0.004..0.005 rows=0 loops=1)

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

Index Scan using shopify_orders_2017_06_12_on_shop_id on shopify_orders_2017_06_12 o_23 (cost=0.29..4.32 rows=1 width=29) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: (shop_id = 1)
49. 0.257 0.257 ↓ 0.0 0 1

Index Scan using shopify_orders_2016_01_12_on_shop_id on shopify_orders_2016_01_12 o_24 (cost=0.14..8.16 rows=1 width=56) (actual time=0.257..0.257 rows=0 loops=1)

  • Index Cond: (shop_id = 1)
50. 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_25 (cost=0.14..8.16 rows=1 width=56) (actual time=0.004..0.005 rows=0 loops=1)

  • Index Cond: (shop_id = 1)
51. 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_26 (cost=0.14..8.16 rows=1 width=56) (actual time=0.004..0.004 rows=0 loops=1)

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

Index Scan using shopify_orders_2013_on_shop_id on shopify_orders_2013 o_27 (cost=0.14..8.16 rows=1 width=56) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (shop_id = 1)
53. 0.010 0.905 ↓ 0.0 0 5

Bitmap Heap Scan on shopify_order_adjustments a (cost=4.30..11.97 rows=1 width=56) (actual time=0.181..0.181 rows=0 loops=5)

  • Recheck Cond: (shopify_order_id = o_15.id)
  • Filter: ((created_at >= '2019-08-01 04:00:00'::timestamp without time zone) AND (created_at <= '2019-08-15 03:59:59'::timestamp without time zone))
54. 0.895 0.895 ↓ 0.0 0 5

Bitmap Index Scan on index_shopify_order_adjustments_on_shopify_order_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.179..0.179 rows=0 loops=5)

  • Index Cond: (shopify_order_id = o_15.id)
55. 0.001 0.026 ↓ 0.0 0 1

Subquery Scan on *SELECT* 4 (cost=27.37..27.46 rows=2 width=1,199) (actual time=0.026..0.026 rows=0 loops=1)

56. 0.000 0.025 ↓ 0.0 0 1

GroupAggregate (cost=27.37..27.43 rows=2 width=1,187) (actual time=0.025..0.025 rows=0 loops=1)

  • Group Key: o_28.id
57. 0.012 0.025 ↓ 0.0 0 1

Sort (cost=27.37..27.38 rows=2 width=80) (actual time=0.024..0.025 rows=0 loops=1)

  • Sort Key: o_28.id
  • Sort Method: quicksort Memory: 25kB
58. 0.000 0.013 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.70..27.36 rows=2 width=80) (actual time=0.013..0.013 rows=0 loops=1)

59. 0.001 0.013 ↓ 0.0 0 1

Nested Loop (cost=0.42..26.73 rows=2 width=80) (actual time=0.012..0.013 rows=0 loops=1)

60. 0.001 0.012 ↓ 0.0 0 1

Append (cost=0.00..9.84 rows=2 width=40) (actual time=0.012..0.012 rows=0 loops=1)

61. 0.001 0.001 ↓ 0.0 0 1

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

  • Filter: ((created_at >= '2019-08-01 04:00:00'::timestamp without time zone) AND (created_at <= '2019-08-15 03:59:59'::timestamp without time zone) AND (shop_id = 1))
62. 0.010 0.010 ↓ 0.0 0 1

Index Scan using shopify_orders_2019_06_09_on_shop_id on shopify_orders_2019_06_09 o_29 (cost=0.29..9.83 rows=1 width=41) (actual time=0.010..0.010 rows=0 loops=1)

  • Index Cond: (shop_id = 1)
  • Filter: ((created_at >= '2019-08-01 04:00:00'::timestamp without time zone) AND (created_at <= '2019-08-15 03:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 5
63. 0.000 0.000 ↓ 0.0 0

Index Scan using index_shopify_shipping_lines_on_shopify_order_id on shopify_shipping_lines sl (cost=0.42..8.44 rows=1 width=48) (never executed)

  • Index Cond: (shopify_order_id = o_28.id)
64. 0.000 0.000 ↓ 0.0 0

Index Scan using index_shopify_shipping_tax_lines_on_shopify_shipping_line_id on shopify_shipping_tax_lines s (cost=0.28..0.30 rows=1 width=16) (never executed)

  • Index Cond: (sl.id = shopify_shipping_line_id)
Planning time : 32.361 ms
Execution time : 13.458 ms