Objectives: Sleep disorders cause changes of autonomic nervous system (ANS) which affect cardiovascular system. Primary insomnia (PI) makes acceleration of sympathetic nervous system (SNS) tone by sleep deficiency and arousal. Obstructive sleep apnea syndrome (OSAS) sets off SNS by frequent arousals and hypoxemias during sleep. We aimed to compare the changes of heart rate variability (HRV) indices induced by insomnia or sleep apnea to analyze for ANS how much to be affected by PI or OSAS. Methods: Total 315 subjects carried out nocturnal polysomnography (NPSG) were categorized into 4 groups - PI, mild, moderate and severe OSAS. Severity of OSAS was determined by apnea-hypopnea index (AHI). Then we selected 110 subjects considering age, sex and valance of each group's size [Group 1 : PI (mean age=$41.50{\pm}13.16$ yrs, AHI <5, n=20), Group 2 : mild OSAS (mean age=$43.67{\pm}12.11$ yrs, AHI 5-15, n=30), Group 3 : moderate OSAS (mean age $44.93{\pm}12.38$ yrs, AHI 16-30, n=30), Group 4 : severe OSAS (mean age=$45.87{\pm}12.44$ yrs, AHI >30, n=30)]. Comparison of HRV indices among the four groups was performed with ANCOVA (adjusted for age and body mass index) and Sidak post-hoc test. Results: We found statistically significant differences in HRV indices between severe OSAS group and the other groups (PI, mild OSAS and moderate OSAS). And there were no significant differences in HRV indices among PI, mild and moderate OSAS group. In HRV indices of PI and severe OSAS group showing the most prominent difference in the group comparisons, average RR interval were $991.1{\pm}27.1$ and $875.8{\pm}22.0$ ms (p=0.016), standard deviation of NN interval (SDNN) was $85.4{\pm}6.6$ and $112.8{\pm}5.4$ ms (p=0.022), SDNN index was $57.5{\pm}5.2$ and $87.6{\pm}4.2$ (p<0.001), total power was $11,893.5{\pm}1,359.9$ and $18,097.0{\pm}1,107.2ms^2$(p=0.008), very low frequency (VLF) was $7,534.8{\pm}1,120.1$ and $11,883.8{\pm}912.0ms^2$ (p=0.035), low frequency (LF) was $2,724.2{\pm}327.8$ and $4,351.6{\pm}266.9ms^2$(p=0.003). Conclusions: VLF and LF which were correlated with SNS tone showed more increased differences between severe OSAS group and PI group than other group comparisons. We could suggest that severe OSAS group was more influential to increased SNS activity than PI group.