explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OGvE

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 9,913.040 ↑ 1.0 1 1

Aggregate (cost=723,277.25..723,277.26 rows=1 width=0) (actual time=9,913.039..9,913.040 rows=1 loops=1)

2. 0.002 9,913.032 ↑ 1,804,479.0 1 1

Unique (cost=687,187.67..700,721.26 rows=1,804,479 width=12) (actual time=9,913.031..9,913.032 rows=1 loops=1)

3. 0.056 9,913.030 ↑ 1,804,479.0 1 1

Sort (cost=687,187.67..691,698.86 rows=1,804,479 width=12) (actual time=9,913.030..9,913.030 rows=1 loops=1)

  • Sort Key: citations_citation.created_at DESC, citations_citation.id DESC
  • Sort Method: quicksort Memory: 25kB
4. 4,548.176 9,912.974 ↑ 1,804,479.0 1 1

Hash Right Join (cost=299,366.23..499,673.87 rows=1,804,479 width=12) (actual time=4,138.377..9,912.974 rows=1 loops=1)

  • Hash Cond: (citations_citationuser.citation_id = citations_citation.id)
  • Filter: CASE WHEN (citations_citationuser.user_id = 1784373) THEN true ELSE false END
  • Rows Removed by Filter: 3660291
5. 1,294.373 1,294.373 ↓ 1.0 3,875,619 1

Seq Scan on citations_citationuser (cost=0.00..86,309.80 rows=3,863,980 width=8) (actual time=0.005..1,294.373 rows=3,875,619 loops=1)

6. 1,316.188 4,070.425 ↓ 1.0 2,988,833 1

Hash (cost=247,576.07..247,576.07 rows=2,979,373 width=12) (actual time=4,070.425..4,070.425 rows=2,988,833 loops=1)

  • Buckets: 4194304 Batches: 2 Memory Usage: 102784kB
7. 2,754.237 2,754.237 ↓ 1.0 2,988,833 1

Seq Scan on citations_citation (cost=0.00..247,576.07 rows=2,979,373 width=12) (actual time=0.025..2,754.237 rows=2,988,833 loops=1)

  • Filter: (partner_id IS NULL)
  • Rows Removed by Filter: 213000