Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Inner join

Former Member
0 Likes
694

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...

5 REPLIES 5
Read only

Former Member
0 Likes
657

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.

Read only

JozsefSzikszai
Active Contributor
0 Likes
657

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

Read only

Former Member
0 Likes
657

For second table field , create secondary index for performance issue.

now you can joins the tables and get required data.

Read only

ThomasZloch
Active Contributor
0 Likes
657

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

Read only

Former Member
0 Likes
657

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