If the industry is dominated by a few major large retailers like Walmart and target with thousands of many other small supermarkets around the country, what is the market structure of the industry? is it a perfect competition or an oligopoly?
Oligopoly is best understood as occuring when firms behave strategically: when firms decide how much to produce, under oligopoly they will take into account the optimal responses of other firms.
If you have a long tail of small firms, beyond a certain size these firms won't have much influence at all on prices and will act as 'price-takers'.
So either the firms are large enough to have an impact - in which case everyone is an oligopolist, or they are small enough not to matter much - in which case the market is still oligopolistic because only the larger firms matter. Note competition authorities regularly block mergers in markets with 2-3 large firms and a bunch of very small ones: E.g. the European Commission's DG Comp has just blocked Siemens/Alstom given the large market shares of these firms, despite the fact that they face competition from a few smaller suppliers.
Only if all firms were small / had to act as price takers would you have something (that might approximate) perfect competition