explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4DwM

Settings
# exclusive inclusive rows x rows loops node
1. 41.019 112,313.086 ↓ 115.1 23,027 1

Unique (cost=41,806,638.30..42,785,275.00 rows=200 width=8) (actual time=95,278.955..112,313.086 rows=23,027 loops=1)

2. 39.712 112,272.067 ↑ 14.9 23,027 1

Subquery Scan on r (cost=41,806,638.30..42,768,079.10 rows=343,918 width=8) (actual time=95,278.952..112,272.067 rows=23,027 loops=1)

3. 4,564.910 112,232.355 ↑ 14.9 23,027 1

GroupAggregate (cost=41,806,638.30..42,699,295.50 rows=343,918 width=40) (actual time=95,278.950..112,232.355 rows=23,027 loops=1)

  • Group Key: r_1.fk_person_id
  • Filter: ('reject'::text = ALL ((array_agg(DISTINCT r_1.status))::text[]))
  • Rows Removed by Filter: 671704
4. 4,286.666 107,667.445 ↓ 6.6 2,594,861 1

Subquery Scan on r_1 (cost=41,806,638.30..42,573,965.90 rows=393,501 width=13) (actual time=95,267.027..107,667.445 rows=2,594,861 loops=1)

  • Filter: (r_1.n <= 10)
5. 5,493.734 103,380.779 ↓ 2.2 2,594,861 1

WindowAgg (cost=41,806,638.30..42,278,839.90 rows=1,180,504 width=29) (actual time=95,267.023..103,380.779 rows=2,594,861 loops=1)

6. 5,622.073 97,887.045 ↓ 2.2 2,594,861 1

Sort (cost=41,806,638.30..41,865,663.50 rows=1,180,504 width=21) (actual time=95,267.013..97,887.045 rows=2,594,861 loops=1)

  • Sort Key: eic_comm_eic_person.fk_person_id, eic_comm_eic_person.fk_comm_id DESC
  • Sort Method: external merge Disk: 79016kB
7. 92,264.972 92,264.972 ↓ 2.2 2,594,861 1

Seq Scan on eic_comm_eic_person (cost=0.00..39,424,841.73 rows=1,180,504 width=21) (actual time=85,433.660..92,264.972 rows=2,594,861 loops=1)

  • Filter: (audit_cd > (now() - '7 days'::interval))
  • Rows Removed by Filter: 109944541
Planning time : 0.208 ms
Execution time : 112,346.714 ms