473,396 Members | 1,777 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Does anyone have experience with the efficiency of global temporary tables?

I am interested in declaring a global temporary table within an
application. The application processes 1 set of 600 or less rows each
iteration.
Multiple programs can and do call this one application at the same
time. Today, we are using a permanent DB2 table and getting all
kinds of locking even with row level locking on. In addition, our
performance is slow as we do two inserts and two deletes on each row
per program iteration. The program can be called up to 5 or 6
thousand time in one run. Or, it may only be called once.

The bottom line: What potential problems are there with declaring a
temporary table on the fly? Is this efficient or does it cost much
overhead?

Chuck
Russell Corp.
Nov 12 '05 #1
2 2336
Which platform are you on?
Cheers
Serge
Nov 12 '05 #2
Chcuk, yes we are using global temporary tables in our app (ERP) and
the performance is good. My recomendations are :
- Create a separate tablespace for the session tables
- DECLARE the GLOBAL TEMPORARY TABLE with ON COMMIT PRESERVE ROWS IN
your_table_space_for_session tables to avoid deleting all rows when
you commit a transaction. Default behavior of a declared temporary
table is to delete all rows from the table when you commit a
transaction.
- Add NOT LOGGED to the DECLARE statement to avoid logging of the
tables

Read more here http://publib.boulder.ibm.com/infoce...help/index.jsp
,search for DECLARE GLOBAL TEMPORARY
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

30
by: Christian Seberino | last post by:
How does Ruby compare to Python?? How good is DESIGN of Ruby compared to Python? Python's design is godly. I'm wondering if Ruby's is godly too. I've heard it has solid OOP design but then...
4
by: Corrine | last post by:
Hi, I am creating a global temporary table that is session-specific. I insert a BLOB into this table, and then select the BLOB from this table into a ResultSet. The ResultSet sees this BLOB...
10
by: Ranga | last post by:
I was unable to run the statement "CREATE GLOBAL TEMPORARY TABLE" on unix version of DB2, it gave the follwing error db2 => create global temporary table temp ( OGI_SYS_NR char(8) ) DB21034E ...
2
by: David Parker | last post by:
In our application we have a table that tracks network sessions. The usage is: 1) create a session record 2) read/update the record several times during the session 3) delete the session record...
2
by: rrossney | last post by:
Please look at the "what I've already done" section of this message before responding to it: I believe that I've done everything that the people who experience this error are typically told to do....
0
by: dataguy | last post by:
I have my developers explaining the stored procedures that they write using visual studio. These stored procedures are for DB2 os390. In one case, one of the developers has defined a global...
2
by: Bruce Lawrence | last post by:
I have a few Access 97 DB's and I'm linking SQL tables via ODBC connection in vba code. I've found that the performance is slowing down. I have a few macros that import TXT files using import...
0
by: sgueder | last post by:
Hi there, hope anybody can help me: I want to create a temporary table, want to fill that table with data and finally I want to use that table as my base-table for running some selects on it...
5
by: Rahul B | last post by:
Hi, I have very little knowledge about creating Procedures/functions in DB2. When i tried to create the test function like CREATE FUNCTION GET_TEST (P_TEST_ID INTEGER, P_SEL_OR_SORT...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.