Tpump- Pack factor and sessions ?

Tools
Enthusiast

Tpump- Pack factor and sessions ?


Hi ppl,

In one of the articles i had come across, "pack factor and number of sessions contribute to the level of parallelism insite TD" .. can anyone tell exactly, how this happens..???

Thanks,

Rock
9 REPLIES
Enthusiast

Re: Tpump- Pack factor and sessions ?

In simpler terms pack factor helps you to bundle up a bunch on instructions into a single package and send it to TD. That's faster than sending one instruction, getting back it's ACK/RESP from TD, send the next instruction etc...

And having more sessions... well that help you do things in parallel ... it's like having more people to pick cherries is faster than having one person pick .. :)

So having multiple sessions gives your more workers to do things in parallel ...
Enthusiast

Re: Tpump- Pack factor and sessions ?


Thanks joe, adding to the ealier question.., let say we have a pack factor of 3 (three insert queries have been sent) and 4 sessions available in total. What i want to know is, will the queries be sent in one session or will it get distributed across different sessions....say one for each session..leave one session idle??

Rgrds,

Rock
Enthusiast

Re: Tpump- Pack factor and sessions ?

Actually it "depends"

For example, if you had serialize on, and all the three records had the same value for key, you would end up using just one session. On the other hand if all the three records had diff key values, it will go to 3 sessions with serialize on.

Without serialize on, all the the three records would be loaded by the same session (Because your pack is 10, so it tries to pack 10 records into the first session ...)
Enthusiast

Re: Tpump- Pack factor and sessions ?

Thanks Joe.

Got another one coming your way... :)

As discussed, in each tpump job, we can use SERIALIZE ON option to prevent potential deadlock situation.

Now considering another Tpump job is intiated simentaneouly, my..understanding is, for each tpump the distribution of sqls for its sessions is done independently...so...even if we were to use manual partitioning...how will it ensure all the NUPI values go to the same tpump job..and inturn to the same session???? will it be overwriting sessions ???

Also , what exactly is done, when we say..manual partiontioning done across tpump jobs?

Rgrds,

Rock
Enthusiast

Re: Tpump- Pack factor and sessions ?

If we both are talking the same stuff (oh..) then there are no "multiple" tpump jobs. There's only one tpump job, with multiple sessions. And the job takes care of routing records to proper sessions based on the PI value... since there's only one job reading the data file and doing the assignment to sessions, there's no confusion or manual intervention required.

I hope that clarifies.
Enthusiast

Re: Tpump- Pack factor and sessions ?

Yes, I understood the case when there is only one tpump job with multiple sessoins...etc etc

Now going a step further., what i want to know is if in case there were more than one tpump job running simentaneously...updating the same table..in such a case..if they were to update the same PI value...will a deadlock not arise? if so..how can this be prevented??

Enthusiast

Re: Tpump- Pack factor and sessions ?

That's true in that case there's a possibility of dead lock, one way to avoid that is to put pack factor 1 (very lousy in terms of performance).

Re: Tpump- Pack factor and sessions ?

I am trying to find the performance stats of a TPUMP control file that I am Using to run an insert statement. I need to find the SESSION No. in which the Insert is done in TERADATA Database. Please tell me how to do it.. Thanks
Enthusiast

Re: Tpump- Pack factor and sessions ?

Hi,

For this scenario...

TPUMP is doing updates to the PPI table on daily basis. Whether the serialize on multi session TPUMP works fine? My basic question is to understand whether the Serialize work on multiple session TPUMP to the PPI table? Please advise