Joining Datasets

  • Thread starter Thread starter news
  • Start date Start date
N

news

I have to join datasets, what is the quickest way?

eg

ds1 = [1,2,3,4,5]
ds2=[4,5,8,9,20]

jds = [4,5];

ie the data common to ds1 and ds2 is inserted into jds..


I know I can loop ds1 and test but this will be slow, and I am wondering if
it is better to create a stored procedure which checks, or insert into temp
tables and then check with an SQL query, eg a join


I am using two datasets as an example but it can be several.
 
if they're sorted, then looping (in parallel) would be the fastest thing.
I believe even sorting and looping would be faster than inserting into a
DB and using SQL.
the main question here is why do you need to do this join in the
datasets and not originally in the DB where the data came from?
 
Back
Top