943,747 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Unsolved
  • Views: 770
  • MySQL RSS
Aug 8th, 2008
0

Best way to query

Expand Post »
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!!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Scooby08 is offline Offline
20 posts
since Aug 2008
Aug 9th, 2008
0

Re: Best way to query

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.
Reputation Points: 12
Solved Threads: 6
Light Poster
Demiloy is offline Offline
48 posts
since Aug 2008
Aug 9th, 2008
0

Re: Best way to query

Last edited by Shanti C; Aug 9th, 2008 at 7:19 am.
Reputation Points: 137
Solved Threads: 162
Posting Virtuoso
Shanti C is offline Offline
1,641 posts
since Jul 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: hOW TO INSERT NEW RECORD IN SEC TABLE?
Next Thread in MySQL Forum Timeline: Unable to insert Value into database





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC