Slow dynamicaly created pages.

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Deddog
Forum Commoner
Posts: 55
Joined: Thu Sep 26, 2002 6:05 am
Location: Brighton

Slow dynamicaly created pages.

Post by Deddog »

Hello,
I have recently designed an intranet(PHP) that relies heavily on mysql databases.

At some stages there are 3 pages being simultaneously dynamically created from a DB and then displayed in iframe’s. This causes the main page to load in any thing from 2 to 9 seconds.

If have recently re-written all my select statements and have started to include “mysql_Close()” after all selects are made.

I imagine the slowness is caused by having 3 select statements hit the server at once.

Is there any way I can improve on the loading speed or is there some tweaks I can make to the server?
[]InTeR[]
Forum Regular
Posts: 416
Joined: Thu Apr 24, 2003 6:51 am
Location: The Netherlands

Post by []InTeR[] »

Are you only selecting what you need?
Do you have the right index'es on the database?
Judas
Forum Commoner
Posts: 67
Joined: Tue Jun 10, 2003 3:34 pm
Location: Netherlands

Post by Judas »

Manage your data with session vars.
Display it with Js or DOM.
(maybe XML)
Deddog
Forum Commoner
Posts: 55
Joined: Thu Sep 26, 2002 6:05 am
Location: Brighton

thanks 4 the help

Post by Deddog »

InTer and Judas,
many thanks for the replies.

Recently amended my SQL statements to only select data needed. Also adapted statments to incorporate LEFT JOINS, thus making other functions and select statements redundant.

All the tables have the PRIMARY KEY set as an index.

Not quite ready to delve into the world of XML just yet, but thanks for the sugestion.

Loading times are now at approx 4 seconds.

Any idea's how this can be improved on or is this an ok loading time?

Thanks in advance

Deddog.
Post Reply