explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LRht

Settings
# exclusive inclusive rows x rows loops node
1. 55.113 317.435 ↑ 1.0 100 1

Limit (cost=135,911.12..135,911.17 rows=100 width=733) (actual time=317.410..317.435 rows=100 loops=1)

  • Functions: 18
  • Options: Inlining false, Optimization false, Expressions true, Deforming true
  • Timing: Generation 5.310 ms, Inlining 0.000 ms, Optimization 3.009 ms, Emission 51.526 ms, Total 59.845 ms"Execution Time: 337.727 ms
2.          

CTE accountids

3. 0.005 0.100 ↑ 241.0 1 1

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

4. 0.055 0.055 ↑ 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.051..0.055 rows=1 loops=1)

  • Index Cond: ((sfid)::text = ANY ('{0016000001Cs4zlAAB}'::text[]))
5. 0.016 0.040 ↓ 0.0 0 1

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

6. 0.003 0.003 ↑ 10.0 1 1

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

7. 0.021 0.021 ↓ 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.021..0.021 rows=0 loops=1)

  • Index Cond: ((parentid)::text = (s.sfid)::text)
8. 50.591 262.322 ↑ 734.6 100 1

Sort (cost=135,298.11..135,334.84 rows=73,464 width=733) (actual time=262.307..262.322 rows=100 loops=1)

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

Nested Loop (cost=4.51..134,736.56 rows=73,464 width=733) (actual time=28.979..211.731 rows=84,578 loops=1)

10. 0.100 0.100 ↑ 241.0 1 1

CTE Scan on accountids (cost=0.00..1.45 rows=241 width=54) (actual time=0.056..0.100 rows=1 loops=1)

11. 133.959 150.741 ↓ 277.3 84,578 1

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

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

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

  • Index Cond: ((""accountId"")::text = (accountids.sfid)::text)