explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Q1pK

Settings
# exclusive inclusive rows x rows loops node
1. 0.196 31,319.970 ↑ 1.0 1 1

Aggregate (cost=14,821.55..14,821.56 rows=1 width=8) (actual time=31,319.970..31,319.970 rows=1 loops=1)

2. 0.136 31,319.774 ↓ 1.7 1,134 1

Append (cost=1,120.41..14,813.18 rows=670 width=1,259) (actual time=16,609.591..31,319.774 rows=1,134 loops=1)

3. 1.025 31,319.636 ↓ 1.7 1,134 1

Result (cost=1,120.41..14,809.78 rows=669 width=1,259) (actual time=16,609.590..31,319.636 rows=1,134 loops=1)

4. 0.000 31,318.611 ↓ 1.7 1,134 1

Append (cost=1,120.41..14,799.74 rows=669 width=1,251) (actual time=16,609.587..31,318.611 rows=1,134 loops=1)

5. 4,668.299 31,323.990 ↓ 1.7 1,134 1

Gather (cost=1,120.41..14,796.33 rows=667 width=1,251) (actual time=16,609.586..31,323.990 rows=1,134 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 0.313 26,655.691 ↑ 1.8 378 3 / 3

Result (cost=120.41..13,736.30 rows=667 width=1,251) (actual time=8,352.144..26,655.691 rows=378 loops=3)

7. 0.079 26,655.378 ↑ 1.8 378 3 / 3

Parallel Append (cost=120.41..13,727.96 rows=667 width=1,247) (actual time=8,352.140..26,655.378 rows=378 loops=3)

8. 0.316 13,509.504 ↑ 1.8 376 3 / 3

Subquery Scan on *SELECT* 1 (cost=120.78..10,091.75 rows=666 width=966) (actual time=383.019..13,509.504 rows=376 loops=3)

9. 6.400 13,509.188 ↓ 1.4 376 3 / 3

Nested Loop (cost=120.78..10,083.43 rows=278 width=962) (actual time=383.015..13,509.188 rows=376 loops=3)

10. 13,368.226 13,463.838 ↓ 5.6 7,790 3 / 3

Parallel Bitmap Heap Scan on shopify_line_items l (cost=120.78..3,463.11 rows=1,386 width=219) (actual time=100.244..13,463.838 rows=7,790 loops=3)

  • Recheck Cond: ((sku)::text ~* '(rc03141w|af02701w|aw00502w|mm04898w|aw00581w|af02382w|rc03082w|af01774w|af02783w|aw00471w|rc03135w|jn05310w|rc03158w|af03316w|af04993w|af01091w|rc03011w|af01340w|af00039w|rc03008w|rc03023w|af01101w|rc03009w|rc03022w|rc03006w|rc03004w|rc06408w|rc03207w|af00651w|af00051w|af00679w|rc03191w|rc03086w|dd05332w|rc03102w|af00633w|aw01586w|rc03179w|af03725w|aw00533w|af04430w|af04172w|rc03274w|rc03107w|af01607w|et04855w|rc03112w|af04452w|dd05333w|mm02379w|rc03276w|af04128w|af01280w|aw04943w|af05559w|jn05701w|af02423w|af01589w|aw05920d|af04866w|af00758w|rc06410w|rc08216w|aw06063d|rc08235w|dd02586w|af01023w|rc03155w|af04823w|rc07104w|af01470w)'::text)
  • Rows Removed by Index Recheck: 1,953,017
  • Heap Blocks: exact=7,355 lossy=66,017
11. 95.612 95.612 ↓ 245.8 817,909 1 / 3

Bitmap Index Scan on ix_line_items_shop_sku (cost=0.00..119.95 rows=3,327 width=0) (actual time=286.835..286.835 rows=817,909 loops=1)

  • Index Cond: ((sku)::text ~* '(rc03141w|af02701w|aw00502w|mm04898w|aw00581w|af02382w|rc03082w|af01774w|af02783w|aw00471w|rc03135w|jn05310w|rc03158w|af03316w|af04993w|af01091w|rc03011w|af01340w|af00039w|rc03008w|rc03023w|af01101w|rc03009w|rc03022w|rc03006w|rc03004w|rc06408w|rc03207w|af00651w|af00051w|af00679w|rc03191w|rc03086w|dd05332w|rc03102w|af00633w|aw01586w|rc03179w|af03725w|aw00533w|af04430w|af04172w|rc03274w|rc03107w|af01607w|et04855w|rc03112w|af04452w|dd05333w|mm02379w|rc03276w|af04128w|af01280w|aw04943w|af05559w|jn05701w|af02423w|af01589w|aw05920d|af04866w|af00758w|rc06410w|rc08216w|aw06063d|rc08235w|dd02586w|af01023w|rc03155w|af04823w|rc07104w|af01470w)'::text)
12. 7.790 38.950 ↓ 0.0 0 23,370 / 3

Append (cost=0.00..4.74 rows=3 width=608) (actual time=0.005..0.005 rows=0 loops=23,370)

13. 0.000 0.000 ↓ 0.0 0 23,370 / 3

Seq Scan on shopify_orders o (cost=0.00..0.00 rows=1 width=644) (actual time=0.000..0.000 rows=0 loops=23,370)

  • Filter: ((test IS NOT TRUE) AND (created_at >= '2020-04-01 06:00:00'::timestamp without time zone) AND (created_at <= '2020-06-30 05:59:59'::timestamp without time zone) AND (shop_id = 701) AND (l.shopify_order_id = id))
14. 23.370 23.370 ↓ 0.0 0 23,370 / 3

Index Scan using shopify_orders_2020_03_06_pkey on shopify_orders_2020_03_06 o_1 (cost=0.43..2.41 rows=1 width=613) (actual time=0.003..0.003 rows=0 loops=23,370)

  • Index Cond: (id = l.shopify_order_id)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2020-04-01 06:00:00'::timestamp without time zone) AND (created_at <= '2020-06-30 05:59:59'::timestamp without time zone) AND (shop_id = 701))
  • Rows Removed by Filter: 0
15. 7.790 7.790 ↓ 0.0 0 23,370 / 3

Index Scan using shopify_orders_shopify_orders_2020_06_09_pkey on shopify_orders_2020_06_09 o_2 (cost=0.43..2.32 rows=1 width=593) (actual time=0.001..0.001 rows=0 loops=23,370)

  • Index Cond: (id = l.shopify_order_id)
  • Filter: ((test IS NOT TRUE) AND (created_at >= '2020-04-01 06:00:00'::timestamp without time zone) AND (created_at <= '2020-06-30 05:59:59'::timestamp without time zone) AND (shop_id = 701))
16. 0.007 13,145.795 ↓ 2.0 2 2 / 3

Subquery Scan on *SELECT* 2 (cost=120.41..3,632.87 rows=1 width=1,069) (actual time=12,372.492..19,718.693 rows=2 loops=2)

17. 0.022 13,145.788 ↓ 2.0 2 2 / 3

Nested Loop (cost=120.41..3,632.85 rows=1 width=1,041) (actual time=12,372.485..19,718.682 rows=2 loops=2)

18. 4.488 13,145.616 ↓ 2.0 2 2 / 3

Nested Loop (cost=120.41..3,596.16 rows=1 width=176) (actual time=12,372.368..19,718.424 rows=2 loops=2)

19. 13,026.814 13,125.548 ↓ 220.5 11,685 2 / 3

Parallel Bitmap Heap Scan on shopify_line_items l_1 (cost=119.98..3,465.78 rows=53 width=148) (actual time=305.384..19,688.322 rows=11,685 loops=2)

  • Recheck Cond: ((sku)::text ~* '(rc03141w|af02701w|aw00502w|mm04898w|aw00581w|af02382w|rc03082w|af01774w|af02783w|aw00471w|rc03135w|jn05310w|rc03158w|af03316w|af04993w|af01091w|rc03011w|af01340w|af00039w|rc03008w|rc03023w|af01101w|rc03009w|rc03022w|rc03006w|rc03004w|rc06408w|rc03207w|af00651w|af00051w|af00679w|rc03191w|rc03086w|dd05332w|rc03102w|af00633w|aw01586w|rc03179w|af03725w|aw00533w|af04430w|af04172w|rc03274w|rc03107w|af01607w|et04855w|rc03112w|af04452w|dd05333w|mm02379w|rc03276w|af04128w|af01280w|aw04943w|af05559w|jn05701w|af02423w|af01589w|aw05920d|af04866w|af00758w|rc06410w|rc08216w|aw06063d|rc08235w|dd02586w|af01023w|rc03155w|af04823w|rc07104w|af01470w)'::text)
  • Rows Removed by Index Recheck: 2,929,526
  • Filter: (shop_id = 701)
  • Heap Blocks: exact=13,292 lossy=117,036
20. 98.734 98.734 ↓ 245.8 817,909 1 / 3

Bitmap Index Scan on ix_line_items_shop_sku (cost=0.00..119.95 rows=3,327 width=0) (actual time=296.203..296.203 rows=817,909 loops=1)

  • Index Cond: ((sku)::text ~* '(rc03141w|af02701w|aw00502w|mm04898w|aw00581w|af02382w|rc03082w|af01774w|af02783w|aw00471w|rc03135w|jn05310w|rc03158w|af03316w|af04993w|af01091w|rc03011w|af01340w|af00039w|rc03008w|rc03023w|af01101w|rc03009w|rc03022w|rc03006w|rc03004w|rc06408w|rc03207w|af00651w|af00051w|af00679w|rc03191w|rc03086w|dd05332w|rc03102w|af00633w|aw01586w|rc03179w|af03725w|aw00533w|af04430w|af04172w|rc03274w|rc03107w|af01607w|et04855w|rc03112w|af04452w|dd05333w|mm02379w|rc03276w|af04128w|af01280w|aw04943w|af05559w|jn05701w|af02423w|af01589w|aw05920d|af04866w|af00758w|rc06410w|rc08216w|aw06063d|rc08235w|dd02586w|af01023w|rc03155w|af04823w|rc07104w|af01470w)'::text)
21. 15.580 15.580 ↓ 0.0 0 23,370 / 3

Index Scan using index_shopify_refund_line_items_on_shopify_line_item_id on shopify_refund_line_items rl (cost=0.43..2.45 rows=1 width=36) (actual time=0.002..0.002 rows=0 loops=23,370)

  • Index Cond: (shopify_line_item_id = l_1.id)
  • Filter: ((created_at >= '2020-04-01 06:00:00'::timestamp without time zone) AND (created_at <= '2020-06-30 05:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 0
22. 0.023 0.150 ↑ 16.0 1 5 / 3

Append (cost=0.00..36.51 rows=16 width=83) (actual time=0.075..0.090 rows=1 loops=5)

23. 0.008 0.008 ↓ 0.0 0 5 / 3

Seq Scan on shopify_orders o_3 (cost=0.00..0.00 rows=1 width=80) (actual time=0.005..0.005 rows=0 loops=5)

  • Filter: ((test IS NOT TRUE) AND (l_1.shopify_order_id = id))
24. 0.008 0.008 ↓ 0.0 0 5 / 3

Index Scan using shopify_orders_2019_01_03_pkey on shopify_orders_2019_01_03 o_4 (cost=0.42..2.43 rows=1 width=83) (actual time=0.005..0.005 rows=0 loops=5)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
25. 0.010 0.010 ↓ 0.0 0 5 / 3

Index Scan using shopify_orders_2019_03_06_pkey on shopify_orders_2019_03_06 o_5 (cost=0.43..2.45 rows=1 width=96) (actual time=0.006..0.006 rows=0 loops=5)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
26. 0.007 0.007 ↓ 0.0 0 5 / 3

Index Scan using shopify_orders_2019_06_09_pkey on shopify_orders_2019_06_09 o_6 (cost=0.43..2.45 rows=1 width=85) (actual time=0.004..0.004 rows=0 loops=5)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
27. 0.010 0.010 ↓ 0.0 0 5 / 3

Index Scan using shopify_orders_2019_09_12_pkey on shopify_orders_2019_09_12 o_7 (cost=0.43..2.45 rows=1 width=82) (actual time=0.005..0.006 rows=0 loops=5)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
28. 0.007 0.007 ↓ 0.0 0 5 / 3

Index Scan using shopify_orders_2018_01_06_pkey on shopify_orders_2018_01_06 o_8 (cost=0.42..2.44 rows=1 width=75) (actual time=0.004..0.004 rows=0 loops=5)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
29. 0.007 0.007 ↓ 0.0 0 5 / 3

Index Scan using shopify_orders_2018_06_12_pkey on shopify_orders_2018_06_12 o_9 (cost=0.43..2.45 rows=1 width=79) (actual time=0.004..0.004 rows=0 loops=5)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
30. 0.007 0.007 ↓ 0.0 0 5 / 3

Index Scan using shopify_orders_2017_01_06_pkey on shopify_orders_2017_01_06 o_10 (cost=0.42..2.42 rows=1 width=72) (actual time=0.004..0.004 rows=0 loops=5)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
31. 0.007 0.007 ↓ 0.0 0 5 / 3

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

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
32. 0.007 0.007 ↓ 0.0 0 5 / 3

Index Scan using shopify_orders_2016_01_12_pkey on shopify_orders_2016_01_12 o_12 (cost=0.42..2.43 rows=1 width=71) (actual time=0.004..0.004 rows=0 loops=5)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
33. 0.007 0.007 ↓ 0.0 0 5 / 3

Index Scan using shopify_orders_2015_01_12_pkey on shopify_orders_2015_01_12 o_13 (cost=0.42..2.38 rows=1 width=71) (actual time=0.003..0.004 rows=0 loops=5)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
34. 0.007 0.007 ↓ 0.0 0 5 / 3

Index Scan using shopify_orders_2014_01_12_pkey on shopify_orders_2014_01_12 o_14 (cost=0.41..2.39 rows=1 width=70) (actual time=0.004..0.004 rows=0 loops=5)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
35. 0.007 0.007 ↓ 0.0 0 5 / 3

Index Scan using shopify_orders_2013_pkey on shopify_orders_2013 o_15 (cost=0.41..2.36 rows=1 width=70) (actual time=0.004..0.004 rows=0 loops=5)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
36. 0.008 0.008 ↓ 0.0 0 5 / 3

Index Scan using shopify_orders_shopify_orders_2020_01_03_pkey on shopify_orders_2020_01_03 o_16 (cost=0.43..2.45 rows=1 width=82) (actual time=0.005..0.005 rows=0 loops=5)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
37. 0.012 0.012 ↑ 1.0 1 5 / 3

Index Scan using shopify_orders_2020_03_06_pkey on shopify_orders_2020_03_06 o_17 (cost=0.43..2.45 rows=1 width=86) (actual time=0.007..0.007 rows=1 loops=5)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
38. 0.010 0.010 ↓ 0.0 0 5 / 3

Index Scan using shopify_orders_shopify_orders_2020_06_09_pkey on shopify_orders_2020_06_09 o_18 (cost=0.43..2.45 rows=1 width=83) (actual time=0.006..0.006 rows=0 loops=5)

  • Index Cond: (id = l_1.shopify_order_id)
  • Filter: (test IS NOT TRUE)
39. 0.001 0.002 ↓ 0.0 0 1

Subquery Scan on *SELECT* 3 (cost=0.00..0.02 rows=1 width=1,157) (actual time=0.002..0.002 rows=0 loops=1)

40. 0.001 0.001 ↓ 0.0 0 1

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

  • One-Time Filter: false
41. 0.001 0.002 ↓ 0.0 0 1

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

42. 0.001 0.001 ↓ 0.0 0 1

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

  • Group Key: id
43. 0.000 0.000 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=115) (actual time=0.000..0.000 rows=0 loops=1)

  • One-Time Filter: false
44. 0.001 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)

45. 0.001 0.001 ↓ 0.0 0 1

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

  • Group Key: id
46. 0.000 0.000 ↓ 0.0 0 1

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

  • One-Time Filter: false
Planning time : 11.475 ms
Execution time : 31,325.886 ms