explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FNEC

Settings
# exclusive inclusive rows x rows loops node
1. 10.582 166,199.850 ↓ 92.7 55,804 1

Group (cost=13,870.10..13,880.64 rows=602 width=53) (actual time=166,185.505..166,199.850 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. 69.528 166,189.268 ↓ 92.7 55,804 1

Sort (cost=13,870.10..13,871.61 rows=602 width=53) (actual time=166,185.503..166,189.268 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. 189.448 166,119.740 ↓ 92.7 55,804 1

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

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

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

5. 0.010 0.010 ↑ 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.009..0.010 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. 68.796 116.871 ↓ 92.7 55,804 1

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

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

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

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

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

  • Buckets: 16384 Batches: 1 Memory Usage: 1134kB
9. 6.584 7.399 ↑ 1.1 10,725 1

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

  • Recheck Cond: (account_id = '7ba9c902-ff62-11e7-7a69-971100005844'::uuid)
  • Filter: isdefault
  • Heap Blocks: exact=3045
10. 0.815 0.815 ↑ 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=0.815..0.815 rows=10,725 loops=1)

  • Index Cond: (account_id = '7ba9c902-ff62-11e7-7a69-971100005844'::uuid)
11. 165,793.684 165,793.684 ↑ 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.967..2.971 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 : 1.928 ms
Execution time : 166,202.195 ms