"query"? I'm not sure I follow what you are asking here.
For enormous amounts of data most RDBMS's include some sort of bulk loading application. Consult your database documentation to see what it provides. This is also where you will find suggestions on improving performance.
There are general rules you can follow to speed things up. The most obvious is to remove any indices on the table before starting the bulk load. Other things include multi-threading the load, if your loader tool supports this. [ September 18, 2006: Message edited by: Paul Sturrock ]