explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DhiE

Settings
# exclusive inclusive rows x rows loops node
1. 465.916 4,505.395 ↑ 1.0 100 1

Limit (cost=135,911.84..135,911.89 rows=100 width=733) (actual time=4,505.370..4,505.395 rows=100 loops=1)

  • Functions: 20
  • Options: Inlining false, Optimization false, Expressions true, Deforming true
  • Timing: Generation 4.109 ms, Inlining 0.000 ms, Optimization 2.899 ms, Emission 462.353 ms, Total 469.361 ms
2. 334.635 4,039.479 ↑ 734.6 100 1

Sort (cost=135,911.84..135,948.57 rows=73,464 width=733) (actual time=4,039.461..4,039.479 rows=100 loops=1)

  • Sort Key: c."dateTimeOpened", c."ticketNumber" DESC
  • Sort Method: top-N heapsort Memory: 203kB
3. 375.301 3,704.844 ↓ 1.2 84,578 1

Nested Loop (cost=617.52..135,350.29 rows=73,464 width=733) (actual time=276.021..3,704.844 rows=84,578 loops=1)

4. 0.109 0.109 ↑ 241.0 1 1

CTE Scan on subaccounts (cost=613.01..614.45 rows=241 width=722) (actual time=0.064..0.109 rows=1 loops=1)

5.          

CTE subaccounts

6. 0.005 0.105 ↑ 241.0 1 1

Recursive Union (cost=0.08..613.01 rows=241 width=67) (actual time=0.061..0.105 rows=1 loops=1)

7. 0.063 0.063 ↑ 1.0 1 1

Index Scan using account_sfid_key on account p (cost=0.08..4.09 rows=1 width=67) (actual time=0.058..0.063 rows=1 loops=1)

  • Index Cond: ((sfid)::text = ANY ('{0016000001Cs4zlAAB}'::text[]))
8. 0.014 0.037 ↓ 0.0 0 1

Nested Loop (cost=0.08..60.75 rows=24 width=67) (actual time=0.036..0.037 rows=0 loops=1)

9. 0.004 0.004 ↑ 10.0 1 1

WorkTable Scan on subaccounts s (cost=0.00..0.06 rows=10 width=54) (actual time=0.003..0.004 rows=1 loops=1)

10. 0.019 0.019 ↓ 0.0 0 1

Index Scan using account_parentid_idx on account c_1 (cost=0.08..6.06 rows=2 width=67) (actual time=0.019..0.019 rows=0 loops=1)

  • Index Cond: ((parentid)::text = (s.sfid)::text)
11. 3,167.931 3,329.434 ↓ 277.3 84,578 1

Bitmap Heap Scan on mv_case c (cost=4.51..558.15 rows=305 width=752) (actual time=275.936..3,329.434 rows=84,578 loops=1)

  • Recheck Cond: (("accountId")::text = (subaccounts.sfid)::text)
  • Heap Blocks: exact=55,825
12. 161.503 161.503 ↓ 277.3 84,578 1

Bitmap Index Scan on "accountId_new_index" (cost=0.00..4.49 rows=305 width=0) (actual time=161.503..161.503 rows=84,578 loops=1)

  • Index Cond: (("accountId")::text = (subaccounts.sfid)::text)
Execution time : 4,510.342 ms