Not long ago I've installed MySQL server on my other computer and ... well I don't know if I'm doing something wrong because the query I use takes 10 minutes to return results.

The database I'm using is not so big ... 20.000 records in 94 coulmns. With a client program i launch SQL queries (this is an example):

select
sum(DOP.DOP_KOLICINA) as DOP_KOLICINA,
sum(DOP.DOP_SPR_ZALOGE) as DOP_SPR_ZALOGE,
sum(DOP.DOP_SPR_KOSIGZ) as DOP_SPR_KOSIGZ,
sum(DOP.DOP_SPR_REZERV) as DOP_SPR_REZERV,
sum(DOP.DOP_SPR_MP) as DOP_SPR_MP,
sum(DOP.DOP_PRO_VRE * (1.0 -(DOK.DOK_POPUST * DOP.DOP_PRO_POP) /100.0) * DOP.DOP_PRO_SMER) as DOP_PRO_VRE,
avg(DOP.DOP_PRO_CENA * (1.0 -(DOK.DOK_POPUST * DOP.DOP_PRO_POP) /100.0)) as DOP_PRO_CENA,
sum(DOP.DOP_PD_PRO_VRE * (1.0 - (DOK.DOK_POPUST * DOP.DOP_PRO_POP) /100.0) * DOP.DOP_PRO_SMER) as DOP_PD_PRO_VRE,
sum(DOP.DOP_PRO_VRE_PD * (1.0 - (DOK.DOK_POPUST * DOP.DOP_PRO_POP) /100.0) * DOP.DOP_PRO_SMER) as DOP_PRO_VRE_PD,
sum(DOP.DOP_NAB_VRE * (1 - (DOK.DOK_POPUST * DOP.DOP_NAB_POP) /100.0) * DOP.DOP_NAB_SMER) as DOP_NAB_VRE,
sum((DOP.DOP_NAB_VRE_PD - DOP.DOP_NAB_VRE) * (1.0 - (DOK.DOK_POPUST * DOP.DOP_NAB_POP) /100.0) * DOP.DOP_NAB_SMER) as DOP_PD_NAB_VRE,
sum(DOP.DOP_NAB_VRE_PD * (1.0 - (DOK.DOK_POPUST * DOP.DOP_NAB_POP) /100.0) * DOP.DOP_NAB_SMER) as DOP_NAB_VRE_PD,
DOK.PAR_SIFRA,
DOP.ART_SIFRA
from
'PP002DOK' DOK,
'PP002DOP' DOP
where
(DOP.DOK_LETO = DOK.DOK_LETO
and DOP.DOK_TIP = DOK.DOK_TIP
and DOP.DOK_STEVILKA = DOK.DOK_STEVILKA)
and DOK.DOK_TIP IN ('R0','N9','N0','N1','N8','N3','N4','I2','IB','IM' ,'IN','I0','I1','I4','I9','')
and DOK.DOK_STATUS = 'Z'
group by
DOK.PAR_SIFRA,
DOP.ART_SIFRA

Do you know why does it take 10 minutes to get results ????? How can i speed up my queries ???