[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Off Topic Question asp vs php
- Subject: Re: [cobalt-users] Off Topic Question asp vs php
- From: "Steve Werby" <steve-lists@xxxxxxxxxxxx>
- Date: Wed Nov 27 13:33:01 2002
- Organization: Befriend Internet Services LLC
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
"Jamie Rossi" <jamie.rossi@xxxxxxxxxxxx> wrote:
> I have a site on a Cobalt Raq4 that has a mysql backend database. This
> database has roughly 20,000 records. The RAQ4 has 768MB of memory
>
> At present the site uses ASP, and what I find is a page that queries the
> database in ASP can take 30 seconds to return the records.
>
> I recreated the functionality and the sql query in php and the response
> time is down from 30 seconds on a 512KB link to around 4 seconds.
It might not be a ASP/PHP difference so much as the difference between
accessing via ODBC and the MySQL API within PHP.
> What is the view on the best way to connect to a mysql database on a
> RAQ4? The asp site uses ODBC currently. Obviously something is wrong.
Hi Jamie. ODBC is slow. PHP connections using MySQL's client library
compiled into PHP are going to be noticably faster everything else being
equal when dealing with large datasets and complex queries. You likely have
opportunity to improve speed by optimizing the DB tables, optimizing the
queries, creating table indexes that allow the queries to run much faster
and optimizing the server-wide MySQL configuration. It's also likely that
your code can be optimized as well and caching page results is also an
option. None of this is Cobalt-specific though so you'd be better served
discussing on the MySQL list at mysql.com or a list specific to one of the
programming languages mentioned. Relevant techiques and methodology are
discussed quite frequently on the MySQL and PHP lists, there are tutorials
on the subject online. These are all areas I have expertise in, but if
you're looking for assistance online this isn't really the proper forum.
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/