Create/Update table help
I'll try to explain this the best i can.
I have 2 tables one a customer table, which holds customer names and the default address for that customer. The 2nd table has the defualt delivery address, plus other delivery addresses for the customer (so maybe there work address or home address).
The data in the development databases are scrambled so all the customers addresses arnt real, the problem i have is i would like the defualt address to be the same in table a and table b.
My original thought was to update the default address in table 2 by doing a simple update from table 1 but this took way too long (there are around 10million rows).
So my question what is the best way to get the address from table a to update the default address in table b. Table B has a default_address_id column which specifies that this is the address shown in table A.
Hope this makes sence, if not i will try to clarify if you are able to help.
Would you mind in posting...
1- Actual update statement.
2- desc of the two tables
3- Cardinality e.g. number of rows in each table
4- Available indexes for the two tables
Pablo (Paul) Berzukov
Author of Understanding Database Administration
available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Click Here to Expand Forum to Full Width