473,785 Members | 2,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Some questions on Declared Global Temp. Tables

Hi Folks,

1) Why do we have to commit so that statistics are taken into account :

Insert into DGTT
call ADMIN_CMD ('runstats ...')
<<- If we don't commit here, explain plans show that stats are not taken
into account for the following select.
select * from DGTT where ....

Is that correct ? If so, this always implies to have DGTT with on DELETE
PRESERVE ROWS.

2) Why can't we issue an ALTER TABLE ... VOLATILE on such tables ?

We used to do it for Not Logged Initially tables, and switching to DGTT
seems to imply "you'd better run stats".

Thanks for your help,

JM
Nov 12 '05 #1
2 1555
Jean,

1) Documentation states that after running RUNSTATS command "A COMMIT
should be issued to release the locks". The COMMIT is also required to
apply changes to system tables (SYSCOLUMNS, SYSTABLES, SYSCOLDIST).
Issuing a rollback is like canceling collection of the statistics.

The rest is a consequence of that.

2) I'm curious if temporary tables are optimized in the same way as
normal ones (I think not)? Would be nice to have an answer from the
lab, but I guess that VOLATILE is taken into account by default (as it
is temoprary table = table with volatile data).

Greetings, Artur

Nov 12 '05 #2
Artur wrote:
Jean,

1) Documentation states that after running RUNSTATS command "A COMMIT
should be issued to release the locks". The COMMIT is also required to
apply changes to system tables (SYSCOLUMNS, SYSTABLES, SYSCOLDIST).
Issuing a rollback is like canceling collection of the statistics.

The rest is a consequence of that.

2) I'm curious if temporary tables are optimized in the same way as
normal ones (I think not)? Would be nice to have an answer from the
lab, but I guess that VOLATILE is taken into account by default (as it
is temoprary table = table with volatile data).

The table is not considered volatile. The table is defined as APPEND ONLY.

There are thoughts to support ALTER TABLE VOLATILE...

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #3

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

Similar topics

4
13742
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 object, and I am able to get the binary input stream from this blob. However, when I invoke InputStream.read(byte) on this input stream, I get the following exception: java.io.IOException: ORA-01410: invalid ROWID
1
1869
by: Billy Cormic | last post by:
Can anyone tell me or post a link that says how many global temp tables can exist SQL Server 2000? Also, is there a limit to the number of local temp tables that can exist? Thanks, Billy
5
3974
by: Obantec Support | last post by:
Hi i leached some code and strung together a popup i need for a page with 5 help buttons. Now i could use 5 scripts and pre-load the values but i would rather get a better understanding of how to pass some extra values to 1 script. 1. <SCRIPT LANGUAGE="Javascript"><!-- function popUp(url) {
33
3290
by: DFS | last post by:
An application I wrote has been deployed on Citrix, and the Citrix admin tells me all users run the same .mde file. There aren't a lot of concurrent users, but even 2 could be cause for concern. I think the use of globals is worrisome in this case. Anybody have any experience with Access on Citrix? (Al Kallal already griped me out about globals, but if he has anything new to add I'm all ears).
6
2059
by: an0011 | last post by:
Hi static double *var = (double*) malloc(100000*sizeof(double)); is used among other memory allocations to store data that comes from a ..mat file The declarations are done on the main .cpp file and then used by other ..cpp files one of those files is similar to the following:
5
3373
by: Y2J | last post by:
I am working through this book on C++ programming, the author is speaking of using linked lists. He gave and example which I found confusing to say the least. So I rewrote the example in a way that I could better understand the concept, he was trying to convey to me. I ran my own example and it crashed and burn "what a surprise!" : (. I ran the authors example out of the book and quess what, it crashed also, : 0. I ran them both on my...
2
3336
by: db2admin | last post by:
is it necessary to do runstats on global temp tables if you create indexes on them and then want to use global temp tables with indexes efficiently ?
0
1534
by: Mo Nguyen | last post by:
Hi All, I'm planning to write a stored procedure which will be executed million times a day by many people, and is planning to use Declared Global Temporary Tables. One of the concern: the static SQL statements that referenced the temp tables are incrementally bound at run time (SQL Reference volume 2). Should one be worried about these incremental bind? Will these binds update DB2 Catalog tables? How long with the bind take place? and...
2
2188
by: stefan.albert | last post by:
Hello Ravi, what you want to do is very tricky, but possible. I've had this same problem - we want to identify the top user of tempspace and eventually force him off when using too much space (FS runs full). For temptables (NON-DGTT) you can use db2pd to find the owner (- tcbstats) here the application handle (agent id) is listed. But this won't help for DGTTs, because this information isn't given. --Serge : This would be a nice...
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10148
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9950
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.