472,976 Members | 1,236 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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 1522
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
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...
1
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
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...
33
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. ...
6
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...
5
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...
2
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
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...
2
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...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

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.