D-locks will mainly spring open with a hydraulic jack (just requires; bravery, persistance and a blanket to stop the bits flying off into you when it shatters/brakes appart)
Chains will sucumb to bolt croppers.
The only safe way to lock a bike out and about is a combination of the two. But that's impractical. So I just use the old 6speed tourer which is invisible to thieves despite probably being worth more than my cheepest MTB.
On all day rides either keep it in sight at all times (no it wont be safe when you just pop into Edale/Ambleside/Cannock post office for 10 seconds to buy some mint cake). Or buy one of those lightweight locks that's combined with an alarm, or a small cable lock that'd take 5 seconds to cut, but hopefully long enough to discourage the casual thief.