Subject Re: What is efficient Tables that are created and dropped or Records later deleted
Author Bhavbhuti Nathwani
Hi Helen

Yes, that is something similar I had implemented, but my real questions was, is creating and deleting records in this one persistent table a more better way. It won't really grow, records will keep on being created and deleted.

Or creating and dropping lots of persistent tables as and when the report is run. Is this more efficient than above in terms of database management / admin.

Please advise.

Appreciating all your responses.

Kind regards

--- In, Helen Borrie <helebor@...> wrote:
> That problem was about GTTs. GTTs are not intended for your kind of requirement.
> There is a proper way to handle your requirement (where different transactions want to access the same temporary data): create PERSISTENT tables and have your application populate them with *temporary data*. When you design that table, include a session ID field that identifies the rows belonging to a set and have your external application query on that session ID. You'll also want to think about criteria for deleting the temporary data: perhaps some flag that marks the set as 'no longer needed' once the last external app has finished with it.