explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WOs

Settings
# exclusive inclusive rows x rows loops node
1. 0.375 5,829.322 ↑ 1.0 20 1

Limit (cost=10,361.30..10,361.35 rows=20 width=612) (actual time=5,828.795..5,829.322 rows=20 loops=1)

2. 213.749 5,828.947 ↑ 86.2 20 1

Sort (cost=10,361.30..10,365.61 rows=1,723 width=612) (actual time=5,828.774..5,828.947 rows=20 loops=1)

  • Sort Key: t0.created_at DESC
  • Sort Method: top-N heapsort Memory: 66kB
3. 545.708 5,615.198 ↓ 3.7 6,391 1

GroupAggregate (cost=10,177.61..10,315.45 rows=1,723 width=612) (actual time=4,795.579..5,615.198 rows=6,391 loops=1)

  • Group Key: t0.id, o.id
4. 450.894 5,069.490 ↓ 5.2 8,878 1

Sort (cost=10,177.61..10,181.92 rows=1,723 width=674) (actual time=4,795.485..5,069.490 rows=8,878 loops=1)

  • Sort Key: t0.id, o.id
  • Sort Method: external merge Disk: 7424kB
5. 309.505 4,618.596 ↓ 5.2 8,878 1

Nested Loop (cost=3,654.36..10,084.99 rows=1,723 width=674) (actual time=411.408..4,618.596 rows=8,878 loops=1)

6. 0.890 32.545 ↑ 1.0 1 1

Aggregate (cost=2,127.66..2,127.67 rows=1 width=32) (actual time=32.535..32.545 rows=1 loops=1)

7. 1.122 31.655 ↑ 1.5 21 1

Nested Loop (cost=0.29..2,127.58 rows=31 width=8) (actual time=15.867..31.655 rows=21 loops=1)

8. 29.813 29.813 ↑ 1.2 18 1

Seq Scan on "order" cancel_order (cost=0.00..1,920.35 rows=22 width=8) (actual time=15.803..29.813 rows=18 loops=1)

  • Filter: (canceled_from > 0)
  • Rows Removed by Filter: 58970
9. 0.720 0.720 ↑ 2.0 1 18

Index Scan using order_detail_order_id_idx on order_detail cancel_detail (cost=0.29..9.40 rows=2 width=16) (actual time=0.026..0.040 rows=1 loops=18)

  • Index Cond: (order_id = cancel_order.id)
10. 557.160 4,276.546 ↓ 5.2 8,878 1

Nested Loop (cost=1,526.70..7,940.08 rows=1,723 width=642) (actual time=378.830..4,276.546 rows=8,878 loops=1)

11. 650.966 3,417.534 ↓ 5.2 8,878 1

Nested Loop (cost=1,526.41..7,398.97 rows=1,723 width=601) (actual time=378.778..3,417.534 rows=8,878 loops=1)

12. 449.721 2,411.448 ↓ 7.4 8,878 1

Nested Loop (cost=1,525.98..3,605.30 rows=1,195 width=605) (actual time=378.726..2,411.448 rows=8,878 loops=1)

13. 602.744 1,730.899 ↓ 7.4 8,878 1

Nested Loop (cost=1,525.69..3,156.93 rows=1,195 width=593) (actual time=378.677..1,730.899 rows=8,878 loops=1)

14. 249.303 770.259 ↓ 7.7 6,391 1

Hash Join (cost=1,525.40..2,337.72 rows=835 width=722) (actual time=378.618..770.259 rows=6,391 loops=1)

  • Hash Cond: (((t0.metadata ->> 'order_id'::text))::integer = o.id)
15. 142.443 142.443 ↓ 1.0 6,391 1

Seq Scan on users_app_notification t0 (cost=0.00..729.76 rows=6,351 width=694) (actual time=0.035..142.443 rows=6,391 loops=1)

  • Filter: ((status = ANY ('{1,2}'::integer[])) AND (users_id = 70) AND (COALESCE((metadata ->> 'is_chat_noti'::text), 'false'::text) <> 'true'::text))
  • Rows Removed by Filter: 5
16. 168.306 378.513 ↓ 1.0 7,908 1

Hash (cost=1,428.41..1,428.41 rows=7,759 width=28) (actual time=378.513..378.513 rows=7,908 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 559kB
17. 193.002 210.207 ↓ 1.0 7,908 1

Bitmap Heap Scan on "order" o (cost=148.42..1,428.41 rows=7,759 width=28) (actual time=17.401..210.207 rows=7,908 loops=1)

  • Recheck Cond: (ninushi_id = 3)
  • Heap Blocks: exact=816
18. 17.205 17.205 ↓ 1.0 7,908 1

Bitmap Index Scan on order_ninushi_id_idx (cost=0.00..146.48 rows=7,759 width=0) (actual time=17.205..17.205 rows=7,908 loops=1)

  • Index Cond: (ninushi_id = 3)
19. 357.896 357.896 ↑ 2.0 1 6,391

Index Scan using order_detail_order_id_idx on order_detail od (cost=0.29..0.96 rows=2 width=18) (actual time=0.031..0.056 rows=1 loops=6,391)

  • Index Cond: (order_id = o.id)
20. 230.828 230.828 ↑ 1.0 1 8,878

Index Scan using cart_pkey on cart c (cost=0.29..0.38 rows=1 width=20) (actual time=0.026..0.026 rows=1 loops=8,878)

  • Index Cond: (id = od.cart_id)
21. 355.120 355.120 ↑ 1.0 1 8,878

Index Scan using zaiko_orgid_ver_idx on zaiko zk (cost=0.43..3.16 rows=1 width=20) (actual time=0.022..0.040 rows=1 loops=8,878)

  • Index Cond: ((orgid = c.zaiko_id) AND (ver = c.zaiko_ver))
22. 301.852 301.852 ↑ 1.0 1 8,878

Index Scan using catalog_pkey on catalog ctl (cost=0.29..0.31 rows=1 width=53) (actual time=0.034..0.034 rows=1 loops=8,878)

  • Index Cond: (id = zk.catalog_id)
Planning time : 5.547 ms
Execution time : 5,831.150 ms