Also, as has been pointed out, millions of records will be quite overwhelming to a user, as a user is likely to access only a small fraction. Serve them up a menu, presenting the data in logical units. For instance, if you have millions of items in an inventory, break the set down logically (e.g. cosmetics, sporting goods, etc). This way, a user can retrieve a manageable set of data at any given time.
Sure, each time the user desires to access a new logical
unit, you need to fire off a request to the database, but I believe this strategy is a bit more elegant that taking the entire cake and eating it in one mouthful.