Unix Technical Forum

Re: strange behaviour with temporary tables (add. info)

This is a discussion on Re: strange behaviour with temporary tables (add. info) within the DB2 forums, part of the Database Server Software category; --> the type of temporary table that I am using is declare global temporary table Thanks, Sumanth "Sumanth" <Sumanth.Yamala@sas.com> wrote ...


Go Back   Unix Technical Forum > Database Server Software > DB2

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 06:04 AM
Sumanth
 
Posts: n/a
Default Re: strange behaviour with temporary tables (add. info)

the type of temporary table that I am using is
declare global temporary table



Thanks,

Sumanth

"Sumanth" <Sumanth.Yamala@sas.com> wrote in message
news:dsqos0$vgg$1@foggy.unx.sas.com...
> the pseudo code for my update is
>
> for i = 1 to n;
> insert k records into temp_table;
>
> update a set c1 = (select c1 from temp_table where
> temp_table.pk = a.pk), c2 = ( select c2 from
> temp_table where temp_table.pk = a.pk)
> where a.pk in (select pk from temp_table)
>
> delete from temp_table
> commit;
> end for;
>
> When the temp_table is created as a DB2 temporary table, the performance
> degrades after each loop, but if temp_table is created as a regular DB2
> table we see a consistent performance.
>
> Also the number of row_reads (activity monitor) was found to be extremely
> high.
>
> The size of the table that is updated is around 70,000 and the temp_table
> has 8192 rows.
>
> Can anyone shed some light on what I am doing wrong? or if there are any
> limitations on temporary table that I need to be aware of.
>
> Thanks,
> Sumanth
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:20 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com