explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GrcZ : Bricolage slow query analysis #2

Settings
# exclusive inclusive rows x rows loops node
1. 0.059 33,738.832 ↑ 27.0 1 1

Sort (cost=4,400.67..4,400.74 rows=27 width=267) (actual time=33,738.830..33,738.832 rows=1 loops=1)

  • Sort Key: e."timestamp", e.id
  • Sort Method: quicksort Memory: 25kB
2. 0.106 33,738.773 ↑ 27.0 1 1

Hash Left Join (cost=11.40..4,400.03 rows=27 width=267) (actual time=50.705..33,738.773 rows=1 loops=1)

  • Hash Cond: (ea.event_type_attr__id = ta.id)
3. 0.013 33,738.463 ↑ 27.0 1 1

Nested Loop Left Join (cost=8.35..4,396.54 rows=27 width=125) (actual time=50.399..33,738.463 rows=1 loops=1)

4. 44.412 33,738.356 ↑ 27.0 1 1

Hash Join (cost=8.35..4,230.42 rows=27 width=116) (actual time=50.295..33,738.356 rows=1 loops=1)

  • Hash Cond: (e.event_type__id = t.id)
5. 33,693.399 33,693.399 ↓ 14.4 31,031 1

Index Scan using idx_event__obj_id on event e (cost=0.00..4,213.72 rows=2,155 width=24) (actual time=0.221..33,693.399 rows=31,031 loops=1)

  • Index Cond: (obj_id = 20403)
6. 0.013 0.545 ↓ 2.5 5 1

Hash (cost=8.32..8.32 rows=2 width=96) (actual time=0.545..0.545 rows=5 loops=1)

7. 0.218 0.532 ↓ 2.5 5 1

Hash Join (cost=3.20..8.32 rows=2 width=96) (actual time=0.376..0.532 rows=5 loops=1)

  • Hash Cond: (t.class__id = c.id)
8. 0.213 0.213 ↑ 1.0 153 1

Seq Scan on event_type t (cost=0.00..4.53 rows=153 width=76) (actual time=0.020..0.213 rows=153 loops=1)

9. 0.005 0.101 ↑ 1.0 1 1

Hash (cost=3.19..3.19 rows=1 width=28) (actual time=0.101..0.101 rows=1 loops=1)

10. 0.096 0.096 ↑ 1.0 1 1

Seq Scan on class c (cost=0.00..3.19 rows=1 width=28) (actual time=0.074..0.096 rows=1 loops=1)

  • Filter: (lower((pkg_name)::text) ~~ 'bric::util::job'::text)
11. 0.094 0.094 ↓ 0.0 0 1

Index Scan using fkx_event__event_attr on event_attr ea (cost=0.00..6.14 rows=1 width=13) (actual time=0.094..0.094 rows=0 loops=1)

  • Index Cond: (e.id = ea.event__id)
12. 0.057 0.146 ↑ 1.0 39 1

Hash (cost=1.39..1.39 rows=39 width=150) (actual time=0.146..0.146 rows=39 loops=1)

13. 0.089 0.089 ↑ 1.0 39 1

Seq Scan on event_type_attr ta (cost=0.00..1.39 rows=39 width=150) (actual time=0.038..0.089 rows=39 loops=1)

14.          

SubPlan (forHash Left Join)

15. 0.058 0.058 ↓ 1.1 15 1

Seq Scan on alert (cost=0.00..1.14 rows=14 width=4) (actual time=0.037..0.058 rows=15 loops=1)