A few months ago, while preparing an article on extended-depth-of-field software, I put together some pictures to illustrate the tradeoff between sharpness and DOF.

This series is shot with a Sigma 105 mm f/2.8 macro lens at 1:1, on a Canon Digital Rebel camera (22.2 x 14.8 mm sensor size). The subject is a Small Pearl-bordered Fritillary (Boloria selene), tipped at roughly 45 degrees to the optical axis.
If the goal is maximum detail, then the optimum aperture for this lens under these conditions is only around f/8-f/11. Stopping down farther results in progressively less detail. Resolution is obviously degraded even at f/16 and becomes worse with smaller apertures. At f/45 the image would be noticeably fuzzy even in a 4x6 inch print.
Unfortunately, at f/8 the depth of best resolution in a single frame is only about 0.015 inch (0.375 mm).
Extended-depth-of-field software, such as Helicon Focus and CombineZ5, allows high resolution to be achieved over great depths. The image labeled "f/8 + EDOF" results from compositing 35 frames spaced at 0.015 inches, resulting in a total depth of field of 0.525 inch (13.1 mm).
For further information, see the discussion and images posted at http://www.janrik.net/insects/ExtendedD ... deoff.html.
--Rik