Too much boiling (or frying) may destroy the necessary nutrients of vegetables. Is there any rule of thumb or guideline on how much time vegetables should be heated for?
A lot depends on which vegetables are being addressed. Root vegetables, in general, should be cooked. Most people would not relish eating a raw potato, for example, and its nutritional value would actually be less. Cooked carrots have more bio-available vitamin A than raw carrots.
But cooking vegetables will degrade their natural enzymes and most vitamins. For vegetables that can be eaten raw, the less they are cooked, the better. In order to cleanse the exterior surface of any bacteria, etc. that may be present, it is a good idea to blanch them. Blanching just means that the vegetables are cooked at high heat very briefly--enough to cook the outer layer of the vegetable without much warming to its core.
Another option, such as when frying vegetables, is to have a little water in the pan with them (be careful of hot splatter, though). The water will not allow the temperature to exceed water's boiling point (212˚F / 100˚C), as long as there is still enough water in the pan. This will slow the degradation of B-vitamins, vitamin C, etc. due to high heat.