global temporary tables and indexes
I have several global temporary tables I use to insert data into a large table, ~250 million rows. A procedure utilizes these temporary tables and then uses bulk binds to do inserts/updates on the large table. The temp tables hold data to be bulk binded. I bulk bind ~50,000 rows at a time. I want to speed up the processing on the temporary tables with indexes.
I have a question about creating indexes on global temporary tables. If I create an index on the global temporary table, is the index permanent and will it take effect for each session that inserts data into these tables? Do the enteries in the index for a particular session get deleted from the table once the session terminates? Or do I need to create the index on each global table in the procedure and then drop the index when I complete the procedure?
John