Jon Bredensteiner
asked on
ColdFusion Server Side Query vs. SQL Server View - Which is Faster \ Best Practice
I've been asked to help with a ColdFusion website, and I'm still a novice, but there is one thing the main developer does that I find odd (well, there are many things he does that I don't agree with, but that's beside the point). Anyways, he does not have one view in his SQL Server db; he recreates the queries in every page that pulls data, and that includes 90%+ of the pages.
I know it makes since to create queries in some of the pages, especially when they are only going to be used once, but I would think it would be better to create the majority of the queries in the SQL Server, and then simply call them in.
What is the best practice to follow? Which is faster, having the ColdFusion server do the work, or allowing the SQL Server to do the work?
Thanks, Jon
I know it makes since to create queries in some of the pages, especially when they are only going to be used once, but I would think it would be better to create the majority of the queries in the SQL Server, and then simply call them in.
What is the best practice to follow? Which is faster, having the ColdFusion server do the work, or allowing the SQL Server to do the work?
Thanks, Jon
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
So it sounds like it really comes down to how many times a particular query is going to be used. If it will only be used once, then it might as well reside in the CF page, rather than clutter up the database.
Thank you both for your help, Jon
Thank you both for your help, Jon
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thank you for the very detaild answer :)
CF _has_ little to do with the actual query plan. That is all done by SQL Server ...