Which one is Faster : Normal Lookup or Sparse Lookup?

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dgokulakrishnan
Participant
Posts: 14
Joined: Wed May 01, 2013 1:06 pm

Which one is Faster : Normal Lookup or Sparse Lookup?

Post by dgokulakrishnan »

Which one is Faster : Normal Lookup or Sparse Lookup?

can you please tell which lookup is faster. My understanding is Normal lookup would be faster since there is no hit with DB.
ssnegi
Participant
Posts: 138
Joined: Thu Nov 15, 2007 4:17 am
Location: Sydney, Australia

Post by ssnegi »

Sparse lookup should only be used for small number of input records. It is inefficient if the volume of incoming records is high. So it should only be used in situations where the volume of incoming records is less versus the volume of reference records is high.
Example : if you are looking up few records against a large fact table where reading the entire fact table in normal lookup would be inefficient.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Faster?

It depends.

A normal lookup has to load the entire reference data set into memory before even the first lookup can occur. In some cases the reference data set must be read from a database.

A sparse lookup has to go to the database for every single lookup.

But for a sufficiently small number of lookups, sparse may actually be faster.

There are other considerations, too. For example if you want to expose a job as an "always on" web service, then sparse lookup should be preferred so that current information is always provided.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Either one can be faster. :wink:
Choose a job you love, and you will never have to work a day in your life. - Confucius
Post Reply