Holders of the shares of Petco (NASDAQ:PETC), the specialty retailer of pet food, supplies, and services, experienced a pretty wild ride on Thursday. But then again, that's nothing new for the company, as a glance at this three-year chart shows.

The shares opened the day down $0.75, off almost 3% from the prior close, rallied early, then slid for most of the day prior to the 5 p.m. announcement of second-quarter earnings results. An end-of-day rally brought the shares back to the starting point for the day, although after-hours trading had the shares down about 8%.

What's all this about? Petco reported a respectable 2.5% increase in comparable-store sales, on top of a 6.7% increase during the same quarter last year. Net sales for the quarter grew 10.1% over the prior year's second quarter, approximately in line with results for the past two years. All in all, the top line looks pretty healthy, albeit not spectacular.

The issue is that while earnings per share of $0.31 for the quarter came in equal to analyst expectations, the company sounded a very cautious note for the balance of 2005. It expects third-quarter earnings to be $0.25-$0.28, well below last year's $0.36 and analyst expectations of $0.39. The company cited three reasons for the sour outlook -- a shift in mix away from high-margin supplies, increased distribution costs driven by fuel prices, and occupancy costs resulting from more new store openings over the past few quarters.

I must admit I've been a critic this year of retailers' blaming sales softness on higher gas prices. Oil at $65 a barrel is a fact of life today, and consumers will find a way to deal with it. But the distribution-cost effect is real. Oil was in the low $40s a barrel at this time last year; today, it's 50% higher. For specialty retailers, which can easily incur a 2%-3% cost of goods moving product to the stores, we should not be surprised by gross margins down 150 basis points, as Petco reported.

I'm more concerned by the mix-shift issue because Petco has driven solid double-digit earnings increases the past few years, largely resulting from improvements in its gross margin rate. A reversal of this trend could have a disturbing impact on the future earnings growth rate for the company, the primary driver of P/E multiples.

On the other hand, this could be a temporary blip for Petco. Note that the company has solid cash flow and a strong return on equity of 74%. As an investment vehicle, I favor PetSmart (NASDAQ:PETM), a Motley Fool Stock Advisor recommendation. The company delivered a solid second quarter, is managing to grow its gross margin rate, and is sporting a less-shift-key-intensive name to boot.

Investors who want to be in retail should be looking at this category. It occupies a solid niche to compete against the discounters like Wal-Mart (NYSE:WMT) and Target (NYSE:TGT), is not subject to fashion miscues, and I see no evidence of an unexpected decline in pet ownership on the horizon. With multiples in the mid-teens, both companies are worth a walk around the block.

Love your pet? Then check out news from the animal kingdom at:

Fool contributor Timothy M. Otte surveys the retail scene from Atlanta. He walks his exceptionally huggable golden retriever nightly, and owns shares of Wal-Mart, but none of the other companies mentioned in this article.