All Forums Tools
rohitbeth 32 posts Joined 10/07
08 May 2009
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

joedsilva 505 posts Joined 07/05
08 May 2009

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 ...

rohitbeth 32 posts Joined 10/07
10 May 2009

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

joedsilva 505 posts Joined 07/05
10 May 2009

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 ...)

rohitbeth 32 posts Joined 10/07
10 May 2009

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

joedsilva 505 posts Joined 07/05
11 May 2009

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.

rohitbeth 32 posts Joined 10/07
11 May 2009

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??

joedsilva 505 posts Joined 07/05
12 May 2009

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).

20 Feb 2011

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

vasudev 24 posts Joined 12/12
28 Jul 2013

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

You must sign in to leave a comment.