What do you recomend for do a temp- table.

NormaLucia

New Member
In a case did you say that use temp table shared it's not a best practice, would you explain me more.
Why do you say that it's not the best practice?

Regards

Let me see if I understood well, I would try explain about my process, I have a procedure where I create a temp-table when finined it ,
return to principal program, my problem is that it's file it's so big that kill the broker for the time it take.
My principal file has about 50000 record, as you say me it's create a procedure and inside use temp-table would I use is ?. Can you explain me more.
Can I optimize the time process for not broke the time the broker. I had think in create table resume for optimize it., would you recomend another
I would be very happy.

Thanks
 

RealHeavyDude

Well-Known Member
There are a lot of reasons to avoid shared things like temp-tables and variables. You will find countless entries in Progress related forums which discuss this in detail.

The most obvious reason, IMHO, is that shared things bring dependencies and behavior to applications which are not transparent at all. They do not promote re-usability and make applications work like a big silo. You not only need to know the API to software component, you also need to know what's going on inside in order to be able to use it.

Others may add more to it. Instead of sharing a temp-table I would encapsulate at least it in a persistent procedure. If you add that persistent procedure as a session super procedure you can call it from everywhere and you're all set.

Regards, RealHeavyDude.
 

NormaLucia

New Member
Let me see if I understood well, I would try explain about my process, I have a procedure where I create a temp-table when finined it ,
return to principal program, my problem is that it's file it's so big that kill the broker for the time it take.
My principal file has about 50000 record, as you say me it's create a procedure and inside use temp-table would I use is ?. Can you explain me more.
Can I optimize the time process for not broke the time the broker. I had think in create table resume for optimize it., would you recomend another
I would be very happy.

Thanks
 

RealHeavyDude

Well-Known Member
Why do you want to have 50.000 some records in a temp-table? That many records in a temp-table, IMHO, are beyond the concept of temp-tables.

You should give us more background information as to why you think you need to have such large amounts of data in a temp-table.

Regards, RealHeavyDude.
 

NormaLucia

New Member
Yes, I have a original table with this volume the information in a file, this file contains the detail of bonus, I use it for create a new temp-table, where create process for get news report.
This table "temp-table" not contains all this record of original , so I need read it for get the new.Then Im looking for any method for do it more faster and I can model it .
Also maybe the most correct it's create a physical file with resume of this.
My dude is if there are any other process where I can get more faster of process it.?
I hope had explained me.


Thanks.
 

tamhas

ProgressTalk.com Sponsor
Your precise usage is not yet clear, but let me offer a couple of suggestions and see if that helps.

When you create shared variables or temp-tables, you make it obscure where they are modified or used. Conversely, if you pass variables and temp-tables as parameters, then it is very clear where they are coming from and going to.

If you have a reasonably modern version of Progress, look up BIND and REFERENCE-ONLY . These are tools which allow you to have only one copy of a temp-table used by both programs.

I am not clear whether there is an AppServer boundary in here somewhere, but since you are talking about SHARED, I am going to assume that there is not and all the procedures are in the same session. If so, the other thing you should consider is to modify your packaging. Instead of having separate procedures which both need to access the temp-table, put the temp-table into its own procedure which you run persistently and provide that procedure with all of the logic needed to fill, manipulate, and access the TT. Then, the other procedure(s) just use that TT procedure and do whatever is desired with the results.
 

RealHeavyDude

Well-Known Member
There are another couple of things you should be aware:

Usually AppServers and especially WebSpeed Brokers are run in state-less mode. That means that there is no guarantee that consecutive request from the same client will be processed on the same agent. Therefore I doubt that there is any value in processing a temp-table with every request other than there is no other way to provide a complex report.

Another story is to cache small sets of reference data for faster access in an agent's memory when this cache is populated at agent startup. When it takes a long time to populate that cache then you need to take into account that are time limits on the AppServer / WebSpeed Broker which you can configure and which specify how much time the broker has to start a new agent. If you exceed that time you probably need to tweak that setting. Especially in that case a shared temp-table is, IMHO, a bad idea.

Regards, RealHeavyDude.
 
Top