explain.depesz.com

PostgreSQL's explain analyze made readable

Result: knMT

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 296,661.216 ↓ 0.0 0 1

Nested Loop (cost=34,786.53..807,624.93 rows=6 width=1,491) (actual time=296,661.216..296,661.216 rows=0 loops=1)

  • Functions: 46
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 8.899 ms, Inlining 75.313 ms, Optimization 1117.936 ms, Emission 653.305 ms, Total 1855.452 ms
2. 45.255 296,661.215 ↓ 0.0 0 1

Nested Loop (cost=34,786.47..807,613.87 rows=6 width=1,462) (actual time=296,661.215..296,661.215 rows=0 loops=1)

3. 62.509 296,508.425 ↓ 3,584.5 21,507 1

Nested Loop (cost=34,786.42..807,602.82 rows=6 width=1,467) (actual time=4,443.399..296,508.425 rows=21,507 loops=1)

4. 81.486 285,105.951 ↓ 1,917.2 24,923 1

Nested Loop (cost=34,786.33..807,578.21 rows=13 width=1,471) (actual time=4,442.131..285,105.951 rows=24,923 loops=1)

5. 676.498 283,067.255 ↓ 1,022.6 33,745 1

Nested Loop (cost=34,786.25..807,513.84 rows=33 width=1,441) (actual time=4,440.934..283,067.255 rows=33,745 loops=1)

6. 919.921 279,520.593 ↓ 718.3 717,541 1

Hash Join (cost=34,786.19..805,673.95 rows=999 width=1,422) (actual time=4,436.222..279,520.593 rows=717,541 loops=1)

  • Hash Cond: (("case".recordtypeid)::text = (tt.record_type_ids -> 'id'::text))
  • Join Filter: ((("case".category__c)::text = (tt.category)::text) OR (tt.category IS NULL))
  • Rows Removed by Join Filter: 51,548
7. 1,328.730 276,752.542 ↓ 1.0 761,994 1

Merge Join (cost=34,785.11..804,528.72 rows=729,884 width=906) (actual time=2,588.028..276,752.542 rows=761,994 loops=1)

  • Merge Cond: (("case".service__c)::text = (service__c.sfid)::text)
8. 272,754.215 272,754.215 ↑ 5.4 761,995 1

Index Scan using case_service__c_idx on "case" (cost=0.09..4,362,643.59 rows=4,152,574 width=860) (actual time=0.850..272,754.215 rows=761,995 loops=1)

9. 2,438.281 2,669.597 ↑ 1.0 386,490 1

Sort (cost=34,781.16..34,974.52 rows=386,725 width=65) (actual time=2,587.048..2,669.597 rows=386,490 loops=1)

  • Sort Key: service__c.sfid
  • Sort Method: quicksort Memory: 52,580kB
10. 231.316 231.316 ↑ 1.0 386,490 1

Seq Scan on service__c (cost=0.00..27,603.17 rows=386,725 width=65) (actual time=0.017..231.316 rows=386,490 loops=1)

11. 0.021 1,848.130 ↑ 1.0 12 1

Hash (cost=1.04..1.04 rows=12 width=1,064) (actual time=1,848.130..1,848.130 rows=12 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
12. 1,848.109 1,848.109 ↑ 1.0 12 1

Seq Scan on ticket_types tt (cost=0.00..1.04 rows=12 width=1,064) (actual time=1,848.102..1,848.109 rows=12 loops=1)

13. 2,870.164 2,870.164 ↓ 0.0 0 717,541

Index Scan using group_sfid_key on "group" (cost=0.06..1.84 rows=1 width=19) (actual time=0.004..0.004 rows=0 loops=717,541)

  • Index Cond: ((sfid)::text = ("case".ownerid)::text)
  • Filter: (name IS NOT NULL)
14. 1,957.210 1,957.210 ↑ 1.0 1 33,745

Index Scan using location__c_sfid_key on location__c (cost=0.09..1.95 rows=1 width=49) (actual time=0.058..0.058 rows=1 loops=33,745)

  • Index Cond: ((sfid)::text = ("case".location__c)::text)
15. 11,339.965 11,339.965 ↑ 1.0 1 24,923

Index Scan using contact_sfid_key on contact (cost=0.08..1.89 rows=1 width=34) (actual time=0.455..0.455 rows=1 loops=24,923)

  • Index Cond: ((sfid)::text = ("case".contactid)::text)
16. 107.535 107.535 ↓ 0.0 0 21,507

Index Scan using user_sfid_key on "user" (cost=0.06..1.84 rows=1 width=33) (actual time=0.005..0.005 rows=0 loops=21,507)

  • Index Cond: ((sfid)::text = ("case".ownerid)::text)
17. 0.000 0.000 ↓ 0.0 0

Index Scan using user_sfid_key on "user" user_1 (cost=0.06..1.84 rows=1 width=33) (never executed)

  • Index Cond: ((sfid)::text = ("case".createdbyid)::text)
Execution time : 296,696.986 ms