Sounds like it's for an admin / report. I'd dump data to local machine, already have an ODBC connection setup and do the report in either visual foxpro or ms access. I did monthly A/R, A/P reports like that at a trucking company.
A desktop database is far more efficient for large reports and that sort of thing.
Just the way I do things.
Edit: I hope you don't want all 3 million at one time, normally reports are ran weekly / monthly with just those results, and in case of A/R any not paid yet.
Either way look at chunking results if needed.