Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Merge Databases' topicStudent Support Forum > General > Archives > "Merge Databases"

Next Comment >Help | Reply To Topic
Author Comment/Response
Jaime Millan
02/15/12 7:07pm

Hi everyone, I'm working with a bit large database and optimizations but I'm having problems when I need to merge the results of my optimization with my data.
I have a matrix of results A (9000x3) where the column 1 has an id. I have a matrix from my data B (600000x2) where the id is in column 1 as well. The id in A is unique but not in B. What is more not every id of B is on A. What i'm looking for is a matrix C (600000x4) when I merge the data from matrix A to matrix B.

I'm using the code attached which sort both A and B, then for the when i find the interception i star the merging and at the end for those id which i don't find in A i give the value of zero. The process takes arnd 7 minutes, which is much longer that the same process running in Stata for example.

Does anyone knows a more efficient way to merge data?

Thanks in advance

Attachment: mergeWithMpio.nb, URL: ,

Subject (listing for 'Merge Databases')
Author Date Posted
Merge Databases Jaime Millan 02/15/12 7:07pm
Re: Merge Databases Bill Simpson 02/17/12 11:47am
Re: Re: Merge Databases Jaime Millan 02/18/12 2:14pm
Re: Merge Databases Bill Simpson 02/18/12 3:40pm
Next Comment >Help | Reply To Topic