06-25-2008 1:13 PM
Hi gurus,
I have 2 database tables.Can i join these 2 tables based on a field
But the field is primary key in one table whereas in another tabl e it is not.Do i have any perfoemance issues?
Please let me know...
06-25-2008 1:15 PM
hi madan,
ya u can perform join on these 2 tables.. and ya join happnes at database level so it better to avoid join for better performance. rather u can use for all entries instead....
Regards,
Sagar.
06-25-2008 1:16 PM
hi,
yes you can gon with the JOIN. If there is any performance issue: I assuem the JOIN will be faster, but you have to give it a try with JOIN and with 2 SELECTs and see if there is any difference.
"and ya join happnes at database level so it better to avoid join for better performance. rather u can use for all entries instead...."
==> I have read it more than 1000 times on SDN, but is simply not true! Or at least not that simple...
hope this helps
ec
06-25-2008 1:16 PM
For second table field , create secondary index for performance issue.
now you can joins the tables and get required data.
06-25-2008 1:17 PM
No issue with the join. But make sure your WHERE condition uses a primary or secondary index, else you will have performance problems, depending on the amount of data.
Thomas
06-25-2008 1:24 PM
Hi Madan,
You can definitely join those two tables, there would be no performance issues and there is no need to define any secondary index for the second table.
Hope this helps you,
Regards,
Chandra Sekhar