Hi all,
Hope every one is fine.
I have a query which look like this, i have a performance problem with this query
select a.sex,a.age_group,b.organisation,b.name ,sum(b.popualtion),sum(b.population) From table1 a inner join lookup_table b on a.age_group_key=b.age_group_key and a.sex_key=b.sex_key group by a.sex,a.age_group,b.organisation,b.name
I am calculating population in region standardized by age and sex in the above query. the main table table1 got 1.5 millions rows and lookup table got around 1000 values in it.
Instead of keys if i join on normal age group and sex columns the query takes same amount of time don't know why,
can anyone explain me why please.
thanks
RRavilla