Comlex Query vs Multiple Queries
-
Hi Everybody Is it better to apply a single complex query than multiple queries. Has Any body any idea
Perhaps if you broke your complex question into multiple understandable questions, someone will provide an answer. :) Chris Meech I am Canadian. [heard in a local bar] I think people should be required to have an operator's permit to use the internet. John Simmons I have a feeling that if the millions of man hours wasted every year by geeks trying to get various video and sound cards working under Linux were put into some useful endeavor we'd have solved world hunger, we'd have peace and aids would be no more. [JOS poster]
-
Perhaps if you broke your complex question into multiple understandable questions, someone will provide an answer. :) Chris Meech I am Canadian. [heard in a local bar] I think people should be required to have an operator's permit to use the internet. John Simmons I have a feeling that if the millions of man hours wasted every year by geeks trying to get various video and sound cards working under Linux were put into some useful endeavor we'd have solved world hunger, we'd have peace and aids would be no more. [JOS poster]
-
I wanna fetch some data from a database. The data I want is lying in different tables. My Question is Is it better to use a single query containing joins than using different queries to fetch that data
Use the joins. Joins are not in themselves complext, however the data model can be.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
-
I wanna fetch some data from a database. The data I want is lying in different tables. My Question is Is it better to use a single query containing joins than using different queries to fetch that data
It is better to drink water than coffee. :confused: If you mean, "is it going to be faster to run a single query", then the answer is "yes, almost always". If you mean, "is it going to be easier to run multiple queries", then the answer to that is also "yes, almost always". If you mean, "which of the options is going to solve world hunger and remove GW Bush from office", then I would have to say "neither, unless you're progamming the bush-cheney 2004 web-site".:)