Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Maximum number of mysql queries on a php page
Old 06-17-2008, 10:02 AM Maximum number of mysql queries on a php page
Novice Talker

Posts: 7
Name: serkan
Trades: 0
Hi,
On a site I work on, there is a page called references. page contain many references (apox 70 ) for each reference I make 2 queries to get more data about the reference.

this means 1 + 70*2 = 141 queries each time the page is called !!!

is it ok to make that much connections for a page? Or should I look for another solution.

note: page renders fast enough on localhost.
__________________
Fil bilişim

Please login or register to view this content. Registration is FREE
tutunmayan is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-17-2008, 10:06 AM Re: Maximum number of mysql queries on a php page
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Without knowing very much about your situation, I would say that if your solution is an elegant one, page rendering is fast, and most importantly, it works, there shouldn't be any reason to change unless it is slowing down the development process.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is online now
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 06-17-2008, 11:40 AM Re: Maximum number of mysql queries on a php page
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
It depends on the queries themselves. A simple query searching a small amount of data can be run as much as you want with no problems. Same query with 2 million rows might take 40 seconds to run. A complex query on a large amount of data, if optimized, may run quickly, but change which fields are indexed and that same query may take an enormous time to run.

Check out http://www.webmaster-talk.com/the-da...execution.html where I just did an analysis based on tips from some people here on 5 possible ways of performing one query. You'll notice that my best attempt was 20 times faster than the nearest other choice.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Reply     « Reply to Maximum number of mysql queries on a php page
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26300 seconds with 12 queries