Originally posted by gublooo johnson:
And in the first option, there are two select statements which means two database operations which is considered more expensive. But in the first approach, I wont have any redundant data.
The problem I see is that the message_heading is redundant data and would keep repeating. And actually in that table, I have several more fields like message_heading that would keep repeating. The only advantage I see is that It is one SELECT - that is one database operation.
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Originally posted by gublooo johnson:
Yep Jeanne - ur rite....but its just that when your waiting for replies - one hour seems like a long time....but i'll learn to be patient...
I guess i'll have to go for JOIN then. I do agree with Makarand too that performance wont be that big of a deal with 2 selects. I just wanted to find out if there was a preferred way. I guess its a matter of choice then.
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Consider Paul's rocket mass heater. |