View previous topic :: View next topic
|
Author |
Message |
Sasi Kiran Patha Warnings : 2 New User
Joined: 19 Nov 2006 Posts: 73 Location: Hyederabad
|
|
|
|
Hi Guys,
I want to know among the JOIN and Sub Query in DB2 which one is more Efficient and which one uses the minimal no.of resources ...
Thanks,
Sasi Patha |
|
Back to top |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
Sasi,
Not enough information.
It really depend on how the JOIN or Sub query are implemented. Either could be better or not.
For a determination you would have to supply the SQL, Table definitions, and indexes |
|
Back to top |
|
|
Prajesh_v_p
Active User
Joined: 24 May 2006 Posts: 133 Location: India
|
|
|
|
Hi Sasi,
I assume you are asking about the diffrence between a Join and an exists check for a matching record..
From the feedbacks I ve got from DBA's, it seems an EXISTS check is better if do not require a column from the table to be selected. But if you need a column from the table to be selected, better to use JOIN.
Please let me know if I am not answering your question.
Thx,
Prajesh |
|
Back to top |
|
|
|