1

New for Oracle. I have used the global temporary table in Oracle. This temp table stores the input values from the front end, and we further process the data.

So my question is that since multiple users will send the requests how will store the data for different user? For example User A has send the request with record id 101 and 102 and at the same time user B has send the request with record id 103 and 104. So it will process the data independently? Will it not merge the data?

APC
  • 144,005
  • 19
  • 170
  • 281
Pankaj Kumar
  • 655
  • 3
  • 10
  • 16
  • Please try to build an example to clarify your question. [MCVE] can give useful hints. – Aleksej May 04 '17 at 10:58
  • What do you mean "we further process the data"? You have a stored procedure? A job? Some DML? – APC May 04 '17 at 11:42

1 Answers1

2

Global temporary tables store data at the session level. So if User "A" and User "B" are using separate, dedicated connections there is no problem: neither will see the other's data.

Of course in the modern world many applications are web applications and users connect to the database through shared connections in a connection pool. If this is your architecture you have a problem: web architectures are stateless and global temporary tables are stateful. How you would work around this depends on exactly why you are using GTTs in the first place.

APC
  • 144,005
  • 19
  • 170
  • 281
  • thanks for the above inputs above point is clear but one more scenario is that if you can assist me e.g same user with two different tabs then what will happen with data. will data be duplicate in GTT ? – Pankaj Kumar May 16 '17 at 06:20