I Joined two tables , each one containing more than 5000 records . I used two methods to join . In the first query I used JOIN keyword and gave the condition in ON condition . In the second query I just used a comma operator between the tables and gave the joining condition in WHERE clause .
Which one will be effective regarding time and cost ....?
When i look into the execution plan First query took 61 % cost for the TABLE SCAN and 38% for the HASH MATCH ( INNER JOIN )
The second query took 69 % cost for the TABLE SCAN and 31% for the HASH MATCH ( INNER JOIN ) .
Can you explain me this difference ?
Iam assuming that First one is effective , Because the table scan cost is less . Is it right...?