explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wf6c : Optimization for: Optimization for: plan #wjUc; plan #14dR

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.075 12.940 ↑ 5.5 13 1

Sort (cost=559.83..560.00 rows=71 width=11) (actual time=12.935..12.940 rows=13 loops=1)

  • Sort Key: core_keyword.country
  • Sort Method: quicksort Memory: 25kB
2. 0.229 12.865 ↑ 5.5 13 1

HashAggregate (cost=556.93..557.64 rows=71 width=11) (actual time=12.860..12.865 rows=13 loops=1)

  • Group Key: core_keyword.country
3. 0.238 12.636 ↓ 1.3 367 1

Hash Join (cost=20.00..555.57 rows=273 width=7) (actual time=1.405..12.636 rows=367 loops=1)

  • Hash Cond: ((core_keyword.country)::text = (unnest('{RU,US,GB,DE,FR,ES,IT,BR,DZ,AO,AR,AU,AT,AZ,BH,BB,BE,BY,BM,BO,BG,KH,CM,CA,CL,CN,CO,CR,CY,CZ,HR,DK,DO,EC,EG,EE,FI,GH,GR,GT,HK,IS,IN,ID,IE,IL,JP,KZ,KE,KG,KW,HN,HU,LV,LT,LB,LU,MT,MO,MG,MY,MX,NL,NZ,NI,NG,NO,OM,PK,PA,PY,PE,PH,PL,PT,QA,RO,SV,SA,SN,RS,SG,SK,SI,ZA,KR,LK,SE,CH,TW,TH,TN,TR,AE,UG,UA,UY,UZ,VN,VE}'::text[])))
4. 2.685 12.301 ↓ 1.3 367 1

Hash Join (cost=17.24..549.06 rows=273 width=7) (actual time=1.270..12.301 rows=367 loops=1)

  • Hash Cond: (core_keyword.id = core_userkeyword.keyword_id)
5. 9.193 9.193 ↑ 1.0 12,289 1

Seq Scan on core_keyword (cost=0.00..420.12 rows=12,453 width=7) (actual time=0.066..9.193 rows=12,289 loops=1)

  • Filter: (store_type <> 0)
  • Rows Removed by Filter: 8694
6. 0.162 0.423 ↑ 1.3 367 1

Hash (cost=11.40..11.40 rows=467 width=8) (actual time=0.423..0.423 rows=367 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 23kB
7. 0.261 0.261 ↑ 1.3 367 1

Seq Scan on core_userkeyword (cost=0.00..11.40 rows=467 width=8) (actual time=0.024..0.261 rows=367 loops=1)

  • Filter: (user_id = 1)
  • Rows Removed by Filter: 102
8. 0.055 0.097 ↑ 1.0 100 1

Hash (cost=1.51..1.51 rows=100 width=32) (actual time=0.097..0.097 rows=100 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
9. 0.042 0.042 ↑ 1.0 100 1

Result (cost=0.00..0.51 rows=100 width=32) (actual time=0.016..0.042 rows=100 loops=1)

Planning time : 3.069 ms
Execution time : 13.121 ms