Forum Moderators: coopster

Message Too Old, No Replies

What makes script pages to download fast?

         

Mohamed

2:38 pm on Feb 24, 2006 (gmt 0)

10+ Year Member



I have created personal blog using php and mysql every thing seems fine except my pages take more then 15 seconds to appear.
any idea about how I can make pages to appear less then 5 seconds or less.

Scally_Ally

2:49 pm on Feb 24, 2006 (gmt 0)

10+ Year Member



here may be a couple of reasons that your page may be loading very slow

1. you are doing alot of queries of the database on all of these single pages

2. you have all your information stored in one large table in the database.

there are also the general reasons of large image sizes etc..

do any of these apply?

jatar_k

5:22 pm on Feb 24, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



when I find a db driven page that is slow I always start by streamlining my queries, 90% of the time that is the main issue.

Mohamed

8:34 pm on Feb 24, 2006 (gmt 0)

10+ Year Member



I only have logo which is less than 10 kb, all the other data are text.
yes all my data is on one table and I make not more than 5 quries per page.
so I don't know where the problem lies.

Jakarta

what is streamlining? I am novice to databases.

jatar_k

9:03 pm on Feb 24, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



5 queries could be small or it could be a ton.

Things to look for
- are there unnecessary JOINs
- am I selecting * when I am only using a few columns on the page
- am I selecting more records than I am going to display on this page
- am I selecting data that could be carried around another way to cut out 1 query per page

these are just a few things

look at your loops for processing what is returned from your db as well for unnecessary iterations

whoisgregg

11:38 pm on Feb 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would check to make sure that you have indexes in place on the columns you are searching.

Mohamed

7:18 pm on Feb 25, 2006 (gmt 0)

10+ Year Member



Now it is fine and I think the problem was related to the memory. I add mysql_free_result() and the performance increases.