explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fwiv : test

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 27,607.066 ↑ 1.0 10 1

Limit (cost=341,466.50..341,466.52 rows=10 width=68) (actual time=27,607.059..27,607.066 rows=10 loops=1)

2. 10.042 27,607.057 ↑ 549.4 11 1

Sort (cost=341,466.50..341,481.60 rows=6,043 width=68) (actual time=27,607.057..27,607.057 rows=11 loops=1)

  • Sort Key: "*SELECT* 1".email, "*SELECT* 1".number, "*SELECT* 1".name
  • Sort Method: top-N heapsort Memory: 26kB
3. 70.182 27,597.015 ↓ 10.4 62,781 1

HashAggregate (cost=341,271.32..341,331.75 rows=6,043 width=68) (actual time=27,583.419..27,597.015 rows=62,781 loops=1)

  • Group Key: "*SELECT* 1".email, "*SELECT* 1".number, "*SELECT* 1".name
4. 7.079 27,526.833 ↓ 1.1 63,637 1

Append (cost=89,578.29..340,213.78 rows=60,431 width=1,223) (actual time=127.765..27,526.833 rows=63,637 loops=1)

5. 24.219 27,519.752 ↓ 1.1 63,637 1

Result (cost=89,578.29..340,212.75 rows=60,430 width=1,223) (actual time=127.765..27,519.752 rows=63,637 loops=1)

6. 7.309 27,495.533 ↓ 1.1 63,637 1

Append (cost=89,578.29..339,306.30 rows=60,430 width=1,215) (actual time=127.763..27,495.533 rows=63,637 loops=1)

7. 25.913 27,488.223 ↓ 1.1 63,637 1

Result (cost=89,578.29..339,306.30 rows=60,429 width=1,215) (actual time=127.763..27,488.223 rows=63,637 loops=1)

8. 7.175 27,462.310 ↓ 1.1 63,637 1

Append (cost=89,578.29..338,550.94 rows=60,429 width=1,211) (actual time=127.761..27,462.310 rows=63,637 loops=1)

9. 34.401 27,455.134 ↓ 1.1 63,637 1

Subquery Scan on *SELECT* 1 (cost=89,578.29..338,550.93 rows=60,428 width=968) (actual time=127.761..27,455.134 rows=63,637 loops=1)

10. 26,775.031 27,420.733 ↓ 1.1 63,637 1

Hash Join (cost=89,578.29..337,795.58 rows=60,428 width=964) (actual time=127.759..27,420.733 rows=63,637 loops=1)

  • Hash Cond: (l.shopify_order_id = o.id)
11. 518.627 518.627 ↓ 1.0 1,291,932 1

Seq Scan on shopify_line_items l (cost=0.00..73,466.28 rows=1,275,428 width=220) (actual time=0.006..518.627 rows=1,291,932 loops=1)

12. 59.190 127.075 ↓ 1.4 62,781 1

Hash (cost=85,482.42..85,482.42 rows=44,710 width=620) (actual time=127.075..127.075 rows=62,781 loops=1)

  • Buckets: 8192 (originally 8192) Batches: 16 (originally 8) Memory Usage: 4033kB
13. 59.946 67.885 ↓ 1.4 62,781 1

Bitmap Heap Scan on shopify_orders o (cost=8,150.40..85,482.42 rows=44,710 width=620) (actual time=10.087..67.885 rows=62,781 loops=1)

  • Recheck Cond: (shop_id = 80)
  • Filter: ((created_at >= '2018-12-31 18:30:00'::timestamp without time zone) AND (created_at <= '2019-07-18 06:18:05.33'::timestamp without time zone))
  • Rows Removed by Filter: 63615
  • Heap Blocks: exact=16183
14. 7.939 7.939 ↑ 1.0 128,265 1

Bitmap Index Scan on index_shopify_orders_on_shop_id (cost=0.00..8,139.22 rows=128,906 width=0) (actual time=7.939..7.939 rows=128,265 loops=1)

  • Index Cond: (shop_id = 80)
15. 0.000 0.001 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=0.00..0.00 rows=1 width=1,169) (actual time=0.001..0.001 rows=0 loops=1)

16. 0.001 0.001 ↓ 0.0 0 1

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

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

Subquery Scan on *SELECT* 3 (cost=0.00..0.01 rows=1 width=1,192) (actual time=0.001..0.001 rows=0 loops=1)

18. 0.000 0.000 ↓ 0.0 0 1

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

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

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

20. 0.001 0.001 ↓ 0.0 0 1

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

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

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

  • One-Time Filter: false
Planning time : 1.390 ms
Execution time : 27,607.367 ms