NEW YORK, Aug 17 (Reuters) - Resilient U.S. consumer spending drove Walmart's better-than-expected second-quarter results and forecast hike but its international business on Thursday posted its best quarterly performance in several years.

The retail behemoth's international business, which spans 19 countries, posted a 13.3% jump in sales during the second quarter, its strongest result since at least 2016, Refinitiv data shows. The unit posted $27.6 billion in sales, or 17% of the company's quarterly revenue, beating market estimates of $26.12 billion.

In Canada, shoppers are feeling the pinch of higher interest rates faster than in the United States given their shorter-term mortgages, Walmart CEO Doug McMillon said on the call.

"When you put all this together, we see families that are discerning about what they're spending on," he said.

But in Mexico, sales at its Walmex business rose 10%. In India, Walmart's majority-owned business Flipkart posted double-digit sales growth and PhonePe processed more than 5 billion transactions in a single month, Walmart said.

A strong performance in China, where its sales rose 22%, was notable, analysts said, because of a deepening economic slump in the world's second-largest country. Consumer goods giant Unilever and machinery maker Caterpillar are among global firms who have warned of slowing earnings in China.

Newly remodeled Sam's Club stores with less-cluttered racks, brighter lighting and increased signage have attracted Chinese customers, according to Judith McKenna, the retailer's top-most female executive who took over as CEO of Walmart International in 2018.

In April, McKenna said China and India would be instrumental in meeting Walmart's target of doubling the amount of gross merchandise volume it sells in foreign markets, to $200 billion in five years.

McKenna will retire as of January 31, 2024. She will be succeeded in her role by Kathryn McLay, the head of Walmart's Sam's Club business, in September.

"Walmart's international business continues to perform well. Its CEO, Judith McKenna, is leaving on a high note," CI Roosevelt's Senior Portfolio Manager Jason Benowitz said.

(Reporting by Siddharth Cavale in New York and Aishwarya Venugopal in Bengaluru; Editing by Vanessa O'Connell and Mark Porter)