explain.depesz.com

A tool for finding a real cause for slow queries.

Result: kD0

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 76.360 20,550.817 ↑ 1.0 8,761 1

Seq Scan on test1 t1 (cost=0.00..3,574,037.50 rows=8,761 width=4) (actual time=3.343..20,550.817 rows=8,761 loops=1)

2.          

SubPlan (forSeq Scan)

3. 148.937 10,364.263 ↑ 1.0 1 8,761

Aggregate (cost=203.96..203.97 rows=1 width=4) (actual time=1.183..1.183 rows=1 loops=8,761)

4. 6,553.228 10,215.326 ↓ 0.0 0 8,761

Bitmap Heap Scan on test2 t2 (cost=36.49..203.95 rows=1 width=4) (actual time=1.100..1.166 rows=0 loops=8,761)

  • Recheck Cond: ((category)::text = 'A'::text)
  • Filter: (test1_id = $0)
5. 3,662.098 3,662.098 ↑ 1.0 1,631 8,761

Bitmap Index Scan on test_category_idx (cost=0.00..36.49 rows=1,631 width=0) (actual time=0.418..0.418 rows=1,631 loops=8,761)

  • Index Cond: ((category)::text = 'A'::text)
6. 96.371 10,110.194 ↑ 1.0 1 8,761

Aggregate (cost=203.96..203.97 rows=1 width=4) (actual time=1.154..1.154 rows=1 loops=8,761)

7. 6,281.637 10,013.823 ↓ 0.0 0 8,761

Bitmap Heap Scan on test2 t2 (cost=36.49..203.95 rows=1 width=4) (actual time=1.083..1.143 rows=0 loops=8,761)

  • Recheck Cond: ((category)::text = 'A'::text)
  • Filter: (test1_id = $0)
8. 3,732.186 3,732.186 ↑ 1.0 1,631 8,761

Bitmap Index Scan on test_category_idx (cost=0.00..36.49 rows=1,631 width=0) (actual time=0.426..0.426 rows=1,631 loops=8,761)

  • Index Cond: ((category)::text = 'A'::text)