Using N -body/gasdynamic simulations of a Milky Way-like galaxy we analyse a Kennicutt-Schmidt relation , \Sigma _ { SFR } \propto \Sigma _ { gas } ^ { N } , at different spatial scales . We simulate synthetic observations in CO lines and UV band . We adopt the star formation rate ( SFR ) defined in two ways : based on free fall collapse of a molecular cloud – \Sigma _ { SFR, cl } , and calculated by using a UV flux calibration – \Sigma _ { SFR, UV } . We study a KS relation for spatially smoothed maps with effective spatial resolution from molecular cloud scales to several hundred parsecs . We find that for spatially and kinematically resolved molecular clouds the \Sigma _ { SFR, cl } \propto \Sigma _ { gas } ^ { N } relation follows the power-law with index N \approx 1.4 . Using UV flux as SFR calibrator we confirm a systematic offset between the \Sigma _ { SFR, UV } and \Sigma _ { gas } distributions on scales compared to molecular cloud sizes . Degrading resolution of our simulated maps for surface densities of gas and star formation rates we establish that there is no relation \Sigma _ { SFR, UV } - \Sigma _ { gas } below the resolution \sim 50 pc . We find a transition range around scales \sim 50 - 120 pc , where the power-law index N increases from 0 to 1 - 1.8 and saturates for scales larger \sim 120 pc . A value of the index saturated depends on a surface gas density threshold and it becomes steeper for higher \Sigma _ { gas } threshold . Averaging over scales with size of \lower 2.15 pt \hbox { $ \buildrel > \over { \sim } $ } 150 pc the power-law index N equals 1.3 - 1.4 for surface gas density threshold \sim 5 M _ { \odot } pc ^ { -2 } . At scales \lower 2.15 pt \hbox { $ \buildrel > \over { \sim } $ } 120 pc surface SFR densities determined by using CO data and UV flux , \Sigma _ { SFR, UV } / \Sigma _ { SFR, cl } , demonstrate a discrepancy about a factor of 3 . We argue that this may be originated from overestimating ( constant ) values of conversion factor , star formation efficiency or UV calibration used in our analysis .