lto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 10:49 AM
To: Peter Lovatt; Brent Baisley; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: What's Faster? MySQL Queries or PHP Loops?
I've been meaning to follow up on this post.
Can either Peter or someone expand and provide an
K :)
>
> HTH
>
> Peter
>
>
>
> > -Original Message-
> > From: Brent Baisley [mailto:[EMAIL PROTECTED]
> > Sent: 08 September 2004 19:01
> > To: [EMAIL PROTECTED]
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: What's Faster? MySQL
t;
> > -----Original Message-
> > From: Brent Baisley [mailto:[EMAIL PROTECTED]
> > Sent: 08 September 2004 19:01
> > To: [EMAIL PROTECTED]
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: What's Faster? MySQL Queries or PHP Loops?
> >
> >
> > I
I use foxpro to do similar loops
I've found that I get 10 queries per second on large tables, when
connecting once, and issuing individual select statements via odbc.
It is much faster if you can narrow the recordset into an array within
php, and spool through that, unfortunatly I deal with 250+
I never thought of the return only the query"ing"
part.
My predicament is I have a search form that queries a
table with about 7 joins. It returns it via a
Dreamweaver recordset aka SQL query. So based on what
you said below , regarding the number of users, this
is a bad way to go.
Stuart
-
The end result will be the same, it's just a matter of the structure
the data will have when handed to PHP for processing to display. It can
be retrieved bit by bit and broken up into multiple lists or joined and
summarized by MySQL into one list. One list will make the PHP loop
simpler, smalle
ECTED]
> Subject: Re: What's Faster? MySQL Queries or PHP Loops?
>
>
> I would try not to query MySQL on each iteration of the loop. While a
> dozen or so queries may not make a noticeable difference, hundreds or
> thousands may. It's not a scalable technique, whether
I'm confused about this response and am facing a
similar situation.
First, regarding the subject, what is the difference
between a PHP or whatever loop and a SQL query. All
the app code is doing is collecting the request and
handing it back to the database. The DBMS still has
to retrieve the da
I would try not to query MySQL on each iteration of the loop. While a
dozen or so queries may not make a noticeable difference, hundreds or
thousands may. It's not a scalable technique, whether you need to scale
it or not. Even if it's only 100 iterations, what if you have 10 people
accessing t
You're talking about a difference of milliseconds, tops.
Use whatever solution gives you the cleaner, easiest-to-maintain code.
Don't worry about a couple milliseconds.
http://c2.com/cgi/wiki?PrematureOptimization
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To
10 matches
Mail list logo