Last Thursday, BJ's Wholesale Club (BJ -1.13%) returned to the public markets after a seven-year stint under private ownership. The IPO priced at $17 a share -- at the high end of the expected range.

Furthermore, BJ's stock had a nice pop during its first two days of trading, opening at more than $20 and reaching $23.65 by the end of the week. This gave the company a market cap of about $3 billion.

BJ Price Chart

BJ's Wholesale Stock Performance, data by YCharts.

However, BJ's Wholesale Club is clearly inferior to its larger competitor Costco Wholesale (COST -1.78%) in several key respects. This makes it vulnerable to Costco's ongoing growth in the long run. That's why I am steering clear of BJ's stock.

Low sales productivity

BJ's first (and arguably most serious) problem is the low productivity of its warehouses. The company has sales per square foot of about $540, according to retail analyst Chuck Grom. By contrast, Costco generated $93.9 billion of revenue in the U.S. last year with 75.4 million square feet of retail space (as of the end of the fiscal year). This puts Costco's domestic sales per square foot at an incredible $1,245.

This gap in sales productivity is particularly striking because the typical BJ's club is a good deal smaller than a typical Costco (roughly 110,000 square feet compared to 145,000 square feet).

Having a smaller club size should theoretically bolster sales per square foot. However, BJ's doesn't have the same real estate quality as Costco. Furthermore, its target demographic has a lower income than the average Costco member. Finally, Costco has nearly three times as many members per warehouse as BJ's.

The main entrance of a Costco warehouse

Costco has much higher sales volumes per warehouse than BJ's. Image source: Costco Wholesale.

Subpar sales trends

The second strike against BJ's Wholesale Club is that it hasn't been able to grow its sales. Comparable-club sales decreased in four of the last five fiscal years. Excluding gasoline sales -- which can be volatile due to changes in gas prices -- BJ's has reported comp sales declines in each of its five most recent fiscal years.

For comparison, Costco has posted mid-single-digit domestic comp sales growth (excluding gasoline sales) over the past year. For its three most recent fiscal years, it has averaged domestic comp sales growth (ex-gas) of approximately 4%.

BJ's already spends more than 15% of its sales on operating expenses, compared to just 10.3% at Costco. This means that BJ's needs higher gross margins to be profitable. Given that Costco has 10 times as much revenue as BJ's -- and thus more buying power -- the only way that BJ's can maintain a higher gross margin than its larger rival is to charge higher prices (on average).

Costco's strong comp sales growth allows it to continue lowering prices in a way that BJ's cannot match. In the long run, this will widen Costco's competitive moat and enable it to steal share from BJ's. Not surprisingly, BJ's members are not as loyal, with a recent renewal rate of 86%, compared to more than 90% for Costco in the United States.

The balance sheet remains weak

BJ's also has a weak balance sheet, a legacy of its 2011 leveraged buyout. While the company will use its IPO proceeds to pay down high-cost debt, it still expects to have $2.1 billion of debt (and hardly any cash) following the IPO. Meanwhile, Costco has roughly zero net debt.

Due to this heavy debt load, interest expense will eat up about 1% of BJ's revenue going forward. Given that warehouse clubs tend to operate on very tight margins -- Costco's operating margin was just 3.2% in fiscal 2017 -- it's very risky to have a high debt load (and correspondingly high interest expense). BJ's high debt burden could come back to haunt it during the next recession.

There are some encouraging signs -- but not enough

It's not all doom and gloom for BJ's Wholesale Club. The company's profitability has improved dramatically over the past two years, excluding some special items. In addition, sales trends are slowly improving. Last quarter, comp sales rose 2% excluding gasoline.

Nevertheless, I wouldn't want to bet on a sustainable turnaround for BJ's. Costco appears to be interested in moving into more of BJ's core markets, such as upstate New York. In the long run, BJ's will likely struggle to compete against Costco's industry-leading cost structure and massive buying power. That's reason enough for investors to stay away from BJ's Wholesale Club.