Best way to query

Reply

Join Date: Aug 2008
Posts: 19
Reputation: Scooby08 is an unknown quantity at this point 
Solved Threads: 0
Scooby08 Scooby08 is offline Offline
Newbie Poster

Best way to query

 
0
  #1
Aug 8th, 2008
Would anybody happen to know which of these ways is the better way to run your queries??

Would it be better to have all your SELECT queries before the actual <html> code starts, or would it be just fine throughout the page in the <body> tags?? Is one slower than another or maybe smoother than another?? Also, is having multiple queries slower than combining them into one query, or doesn't that really make a difference??

I have about 15 tables on one page that each runs its own query right now.. I have placed the query code within each table to extract the data needed for that specific table.. Im only asking because it just seems as if the page is loading and running a bit slower than without the queries.. Is this just normal for multiple queries to do this??

Thanks to all who reply!!
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 48
Reputation: Demiloy is an unknown quantity at this point 
Solved Threads: 4
Demiloy Demiloy is offline Offline
Light Poster

Re: Best way to query

 
0
  #2
Aug 9th, 2008
I don't think your placement inside the HTML will make a different.

Also, if you have to SELECT from different tables, then you can't really combine them. Well, you can with UNION, but I think separate queries from different tables would be better.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,072
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Re: Best way to query

 
0
  #3
Aug 9th, 2008
Last edited by Shanti Chepuru; Aug 9th, 2008 at 7:19 am.
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC