473,320 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

PHP and mysql seems very slow.

HI all,

I am testing php and mysql, because our ISP only uses that.

To retrieve 25 records from a table of 1564 records, and display the
result
in the browser in a table takes 4 secs with php and mysql. This is running
directly on my PC. With dbase cgi and native dbf tables, the exact same
query is
displayed instantly, the time difference shows as 0.00s.
Cna this be. in my php script I am using ... while ($row =
mysql_fetch_row($qs)) ... to get and then display the rows
Can I speed this up

If it takes this long on a small database, imagine when we go productive,
eeeek

Thanks

Robert


Jul 17 '05 #1
6 1986

"joe soap" <me@u.com> wrote in message
news:-p********************@is.co.za...
HI all,

I am testing php and mysql, because our ISP only uses that.

To retrieve 25 records from a table of 1564 records, and display the
result
in the browser in a table takes 4 secs with php and mysql. This is running
directly on my PC. With dbase cgi and native dbf tables, the exact same
query is
displayed instantly, the time difference shows as 0.00s.
Cna this be. in my php script I am using ... while ($row =
mysql_fetch_row($qs)) ... to get and then display the rows
Can I speed this up

If it takes this long on a small database, imagine when we go productive,
eeeek

Thanks

Robert


So many factors, so little time. I take it you've been through EXPLAIN's
output and spotted any indexing problems?
http://dev.mysql.com/doc/mysql/en/EXPLAIN.html

Garp
Jul 17 '05 #2
Hi joe,

On Sun, 23 May 2004 21:26:54 +0200, "joe soap" <me@u.com> wrote:
HI all,

I am testing php and mysql, because our ISP only uses that.

To retrieve 25 records from a table of 1564 records, and display the
result
in the browser in a table takes 4 secs with php and mysql. This is running
directly on my PC. With dbase cgi and native dbf tables, the exact same
query is
displayed instantly, the time difference shows as 0.00s.
Cna this be. in my php script I am using ... while ($row =
mysql_fetch_row($qs)) ... to get and then display the rows
Can I speed this up

If it takes this long on a small database, imagine when we go productive,
eeeek


With this speed I would assume a DNS problem. On which boxes are MySql
and PHP and how is MySQL accessed (Server Name?).

HTH, Jochen
--
Jochen Daum - Cabletalk Group Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/
Jul 17 '05 #3
"joe soap" <me@u.com> wrote in message
news:-p********************@is.co.za...
I am testing php and mysql, because our ISP only uses that.

To retrieve 25 records from a table of 1564 records, and display the
result
in the browser in a table takes 4 secs with php and mysql. This is running
directly on my PC. With dbase cgi and native dbf tables, the exact same
query is
displayed instantly, the time difference shows as 0.00s.
Cna this be. in my php script I am using ... while ($row =
mysql_fetch_row($qs)) ... to get and then display the rows
Can I speed this up


Are there indices on the columns that you're searching? I have noticed that
MySQL requires more manual optimization than the database that I usually use
(MS SQLServer).
Jul 17 '05 #4
Hi,
So many factors, so little time. I take it you've been through EXPLAIN's
output and spotted any indexing problems?
http://dev.mysql.com/doc/mysql/en/EXPLAIN.html

Garp

Thanks for the response. The column is indexed, no noticable difference. I
take it that it must be me, something that I am doing wrong, because when I
test the database inmyphp admin, trying a browse, it is significantly
faster.
Any ideas.

Thanks
Robert
Jul 17 '05 #5
HI,

With this speed I would assume a DNS problem. On which boxes are MySql
and PHP and how is MySQL accessed (Server Name?).


Thanks for the response.
I did not set up a DNS, I assumed that PHP did not need a DNS as it was
accessing the database directly. Anyway I can still access the data without
a dns setup. I take it that it must be me, something that I am doing wrong,
because when I test the database inmyphp admin, trying a browse, it is
significantly faster.
Any ideas.
Thanks
Robert

Jul 17 '05 #6
HI,
Are there indices on the columns that you're searching? I have noticed that MySQL requires more manual optimization than the database that I usually use (MS SQLServer).


Thanks for the response. Yes the column is indexed by the same column that I
orderby. I take it that it must be me, something that I am doing wrong,
because when I test the database inmyphp admin, trying a browse, it is
significantly faster.
Any ideas.
Thanks
Robert

Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Plymouth Acclaim | last post by:
Hi guys, We have a problem with Dual AMD64 Opteron/MySQL 4.0.18/Mandrake 10 for a very high volume site. We are evaluating the performance on our new server AMD64 and it seems it's slow compared...
4
by: Michi | last post by:
I was wondering what the best solution is for making large numbers of TEXT (or BLOB?) fields searchable. For example, if I have a forum, what is the best way to be able to search for specific...
11
by: DJJ | last post by:
I am using the MySQL ODBC 3.51 driver to link three relatively small MySQL tables to a Microsoft Access 2003 database. I am finding that the data from the MySQL tables takes a hell of a long time...
33
by: Joshua D. Drake | last post by:
Hello, I think the below just about says it all: http://www.commandprompt.com/images/mammoth_versus_dolphin_500.jpg Sincerely, Joshua Drake
0
by: timothy.williams | last post by:
Hi. We have a MySQL 5.0.16 server installed on a RedHat 8.0 machine. mysql-administrator v1.0.22 is installed on RH Linux FC3 from the mysql-administrator-1.0.22a-1.rh9.i386.rpm. Everything...
12
by: timothy.williams | last post by:
Hi. I have a Python program that parses a file and inserts records into a database with MySQLdb. I recently upgraded to MySQL 5.0.8, and now my parser runs *really* slow. Writing out to CSV...
6
by: ojorus | last post by:
Hi! My company make several flash-based games, and I use php to communicate with mysql to provide highscore-lists. My problem is this: When I save a player's score in the mysql-table, I want to...
6
by: onnodb | last post by:
Hi all, While working on an Access UI to a MySQL database (which should be a reasonable, low-cost, flexible interface to the DB, better than web-based, much less costly than a full-fledged .NET...
8
by: Daz | last post by:
Hi everyone. I was faced with the choice of whether my problem is indeed a PHP problem or a MySQL. I have decided it's a PHP problem as I don't experience the same problem when I execute the...
2
by: mezise | last post by:
Posted by Pratchaya: ------------------------------------------------------ MySQL Slow Log ERROR In my.cnf i add these lines ####### log-bin log-slow-queries = /var/log/mysqld-slow.log
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.