[NCLUG] programming question
Gary Rogers
garyr at dmin.net
Sat Jun 30 16:30:42 MDT 2001
Are you sure that your time is spent in the application? Here's what I'm
getting at: With a web page there are many variables that go into to
download speed. Identifying where the slow down is is part of tuning the
pages for maximum speed. In your case I'd say you're probably right, it will
be a SQL issue. However, you may be seeing DNS lookups taking time, or
initial download, especially if you're behind a firewall that supports
Stateful packet inspection.
The best page download timer that I've used was with Keynote systems, but
that's probably not an option. Find a page timer that splites things down
into DNS lookup, initial TCP connection, Page download. Then you're sure
that your page is the bottle neck.
Beyond that I'm not sure what tools MySQL gives you to time queries. I've
worked with Oracle DBA's that could find out how long my quesies were
taking. Also, WebLogic was good about telling my how long pages were
connected to the database. Can PHP time your queries for you? The question
you're looking to answer here is this: Are my queries taking long because of
the Database, or because of some code manipulation I'm doing with the
returned code? I want to say that as much code manipulation you can do
inside the database the better, but that's only because I'm used to beefy
database machines that handle cpu intensive joins better than ripping
returned data with perl on the Webservers, or in your case PHP.
Anyway, just don't assume that it's your code is all I'm saying. You may
have to transfer where you're doing the work to get better performance from
a web application.
Gary Rogers
(former) Web SysAdmin ;)
----- Original Message -----
From: "Evelyn Mitchell" <efm at tummy.com>
To: <nclug at nclug.org>
Sent: Saturday, June 30, 2001 3:08 PM
Subject: Re: [NCLUG] programming question
> On Sat, Jun 30, 2001 at 01:40:15PM -0600, mike cullerton wrote:
> > > It helps to understand what resources you're trying to conserve.
> >
> > i hadn't really thought about it specifically, but now that you ask, i'd
say
> > processing or maybe even latency. this is a web based program written in
> > php. in an earlier prototype of this app, i had one page that took a
long
> > time to load. that turned out to be a mysql problem. i fixed it by
adding a
> > new index.
> >
> > so, would any particular approach add an extra amount of processing or
> > latency?
>
> The only way to discover that is to profile the three different
> approaches and see which one takes more processing or have higher latency.
>
> Evelyn
>
> _______________________________________________
> NCLUG mailing list
> NCLUG at nclug.org
> http://www.nclug.org/mailman/listinfo/nclug
>
More information about the NCLUG
mailing list