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.
Which one is Faster : Normal Lookup or Sparse Lookup?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 14
- Joined: Wed May 01, 2013 1:06 pm
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.
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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.