explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hWVC

Settings
# exclusive inclusive rows x rows loops node
1. 10.699 160,558.549 ↓ 92.7 55,804 1

Group (cost=13,870.10..13,880.64 rows=602 width=53) (actual time=160,544.198..160,558.549 rows=55,804 loops=1)

  • Group Key: ke.id, (CASE WHEN (((p.path)::text || (p.id)::text) ~~ '/7bc6d4c8-ff62-11e7-6b01-4b1d0015f3db%'::text) THEN '7bc6d4c8-ff62-11e7-6b01-4b1d0015f3db'::uuid ELSE NULL::uuid END)
2. 77.684 160,547.850 ↓ 92.7 55,804 1

Sort (cost=13,870.10..13,871.61 rows=602 width=53) (actual time=160,544.195..160,547.850 rows=55,804 loops=1)

  • Sort Key: ke.id, (CASE WHEN (((p.path)::text || (p.id)::text) ~~ '/7bc6d4c8-ff62-11e7-6b01-4b1d0015f3db%'::text) THEN '7bc6d4c8-ff62-11e7-6b01-4b1d0015f3db'::uuid ELSE NULL::uuid END)
  • Sort Method: quicksort Memory: 9384kB
3. 146.362 160,470.166 ↓ 92.7 55,804 1

Nested Loop Left Join (cost=10,644.61..13,842.31 rows=602 width=53) (actual time=432.580..160,470.166 rows=55,804 loops=1)

  • Join Filter: (cst.store_id = p.id)
4. 18.331 222.128 ↓ 92.7 55,804 1

Nested Loop (cost=10,644.18..12,595.35 rows=602 width=71) (actual time=82.327..222.128 rows=55,804 loops=1)

5. 0.852 0.852 ↑ 1.0 1 1

Index Scan using i__place__account_id on place p (cost=0.29..2.52 rows=1 width=18) (actual time=0.851..0.852 rows=1 loops=1)

  • Index Cond: (account_id = '7ba9c902-ff62-11e7-7a69-971100005844'::uuid)
  • Filter: (((path)::text || (id)::text) ~~ '/7bc6d4c8-ff62-11e7-6b01-4b1d0015f3db%'::text)
6. 65.922 202.945 ↓ 92.7 55,804 1

Hash Join (cost=10,643.89..12,586.81 rows=602 width=53) (actual time=81.470..202.945 rows=55,804 loops=1)

  • Hash Cond: (ke.element_id = c.feature_id)
7. 55.977 55.977 ↓ 1.0 55,804 1

Seq Scan on kitelement ke (cost=0.00..1,727.84 rows=55,750 width=69) (actual time=0.253..55.977 rows=55,804 loops=1)

  • Filter: (account_id = '7ba9c902-ff62-11e7-7a69-971100005844'::uuid)
  • Rows Removed by Filter: 2263
8. 2.909 81.046 ↑ 1.1 10,725 1

Hash (cost=10,502.89..10,502.89 rows=11,280 width=48) (actual time=81.046..81.046 rows=10,725 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 966kB
9. 74.864 78.137 ↑ 1.1 10,725 1

Bitmap Heap Scan on consignment c (cost=136.25..10,502.89 rows=11,280 width=48) (actual time=3.889..78.137 rows=10,725 loops=1)

  • Recheck Cond: (account_id = '7ba9c902-ff62-11e7-7a69-971100005844'::uuid)
  • Filter: isdefault
  • Heap Blocks: exact=3045
10. 3.273 3.273 ↑ 1.1 10,725 1

Bitmap Index Scan on i__consignment__account_id (cost=0.00..133.43 rows=11,280 width=0) (actual time=3.273..3.273 rows=10,725 loops=1)

  • Index Cond: (account_id = '7ba9c902-ff62-11e7-7a69-971100005844'::uuid)
11. 160,101.676 160,101.676 ↑ 1.0 1 55,804

Index Scan using cost_cons_moment on cost cst (cost=0.43..2.05 rows=1 width=32) (actual time=2.865..2.869 rows=1 loops=55,804)

  • Index Cond: ((account_id = '7ba9c902-ff62-11e7-7a69-971100005844'::uuid) AND (c.id = consignment_id))
  • Filter: ((initialcost_id IS NULL) AND (motion_id IS NOT NULL) AND isvalid AND (momentfrom <= '2020-02-06 13:43:00'::timestamp without time zone) AND (momentto > '2020-02-06 13:43:00'::timestamp without time zone))
  • Rows Removed by Filter: 4480
Planning time : 41.032 ms
Execution time : 160,561.586 ms