Login Register Actian.com  

Actian Community Forum


Go Back   Actian Community Forums > Ingres Forums > Ingres Database Contributions
 

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 2012-06-27   #1 (permalink)
Ingres Community
 
Join Date: Oct 2007
Location: China
Posts: 103
Default Did 10.1 also exist holding temp free problem ?

Hi All,

I found that SELECT / UPDATE lob column which has holding temp creating involved still has memery problems in 10.1 version. For example:

select long_varchar(name) from aa; --name is a varchar column

For every row in aa, the dbms will create a new holding temp table to hold convered name value, and then in the adu_redeem to get value from that holding temp, BUT I found that the system will not delete the holding temp, so row after row, many holding temps will accumulate until end of selection the dmpe_free_temps frees all temps. But if aa has many many rows , it will use up memetry resource before end of selection!

Any idea?

Jiong
xie_jiong is offline   Reply With Quote
Old 2012-07-05   #2 (permalink)
Ingres Community
 
kschendel's Avatar
 
Join Date: Mar 2007
Location: Pittsburgh, PA
Posts: 1,878
Default

Hi Jiong,
Yes, this is a problem. In the 10s (spatial) release, we made a change to allow more than one temporary lob value per holding temp if too many holding temps are being created. That is not an ideal solution but it's workable. I don't know if that change is in any of the public source code releases, since I've lost track of what is being released and what isn't.

Karl
kschendel is online now   Reply With Quote
Old 2012-07-05   #3 (permalink)
Ingres Community
 
Join Date: Oct 2007
Location: China
Posts: 103
Default

Thanks Karl, But will the 'add but not create' solution avoids the memory problem? If one temp table becomes larger and larger, the memory problem also exists I think. Are there any garbage collection involved?

We add the free holding temp in adu_redeem as follows:

....
case ADW_GET_DATA:
...
if (work->adw_fip.fip_pop_cb.pop_error.err_code
== E_AD7001_ADP_NONEXT)
{
work->adw_fip.fip_done = TRUE;

if (status == E_DB_WARN)
status = E_DB_OK;
else
break;

/* new code begin. the premise is pop_temporary set up correct /*
if(work->adw_fip.fip_pop_cb.pop_temporary == ADP_POP_TEMPORARY)
{
status =(*Adf_globs->Adi_fexi[ADI_01PERIPH_FEXI].adi_fcn_fexi)
(ADP_DELETE, &work->adw_fip.fip_pop_cb);
if (status != E_DB_OK)
break;
}

...

It worked, but we don't know its side effect.

Jiong
xie_jiong is offline   Reply With Quote
Old 2012-07-06   #4 (permalink)
Ingres Community
 
kschendel's Avatar
 
Join Date: Mar 2007
Location: Pittsburgh, PA
Posts: 1,878
Default

It's probably OK to free the temp after a redeem, I don't imagine it would get used again. Most of the problems with freeing LOB temps earlier are related to temp value re-use: either in DB procedures, or in an UPDATE statement, or because of something that the query compiler (opc) did.

Multiple values per LOB holding temp does reduce memory usage because you don't need the added temp table TCB, RCB, name-reservation lock, etc.
kschendel is online now   Reply With Quote
Old 2012-07-07   #5 (permalink)
Ingres Community
 
Join Date: Oct 2007
Location: China
Posts: 103
Default

Thanks Karl. We hope the Multiple values per LOB holding temp could open source...
xie_jiong is offline   Reply With Quote

Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


© 2011 Actian Corporation. All Rights Reserved