The actual examination of an invention patent usually takes two to three years or even longer, and the protection period is 20 years.
Generally, both will apply, and you can get the patent certificate (utility model) as soon as possible. When the invention can be authorized, you give up the utility model patent and get the invention patent, which will be protected for 20 years. But also more stable than the utility model (because there is a real trial).