explain.depesz.com

A tool for finding a real cause for slow queries.

Result: Kbq

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 148.976 11,326.034 ↑ 1.0 1 1

Aggregate (cost=360,789.23..360,789.24 rows=1 width=0) (actual time=11,326.034..11,326.034 rows=1 loops=1)

2. 575.550 11,177.058 ↑ 200.0 526,715 1

Nested Loop Left Join (cost=35,181.83..97,400.23 rows=105,355,600 width=0) (actual time=2,546.410..11,177.058 rows=526,715 loops=1)

  • Join Filter: (oe.id = (max(x.id)))
3. 4,262.958 4,807.643 ↓ 13.2 526,715 1

HashAggregate (cost=35,181.83..36,181.83 rows=40,000 width=29) (actual time=2,546.340..4,807.643 rows=526,715 loops=1)

4. 107.859 544.685 ↓ 1.0 526,802 1

Append (cost=0.00..14,110.71 rows=526,778 width=29) (actual time=0.030..544.685 rows=526,802 loops=1)

5. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on o_expertise x (cost=0.00..0.00 rows=1 width=29) (actual time=0.002..0.002 rows=0 loops=1)

  • Filter: (id_load_period = 1205)
6. 436.824 436.824 ↓ 1.0 526,802 1

Seq Scan on o_expertise_1205 x (cost=0.00..14,110.71 rows=526,777 width=29) (actual time=0.027..436.824 rows=526,802 loops=1)

  • Filter: (id_load_period = 1205)
7. 1,053.430 5,793.865 ↑ 2.0 1 526,715

Append (cost=0.00..1.50 rows=2 width=8) (actual time=0.010..0.011 rows=1 loops=526,715)

8. 526.715 526.715 ↓ 0.0 0 526,715

Index Scan using o_expertise_pkey on o_expertise oe (cost=0.00..0.27 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=526,715)

  • Index Cond: (id = (max(x.id)))
  • Filter: (id_load_period = 1205)
9. 4,213.720 4,213.720 ↑ 1.0 1 526,715

Index Scan using o_expertise_1205_pkey on o_expertise_1205 oe (cost=0.00..1.23 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=526,715)

  • Index Cond: (id = (max(x.id)))
  • Filter: (id_load_period = 1205)