Turning to you for help in a speed matter

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Mark Smithers
Forum Newbie
Posts: 1
Joined: Wed Feb 11, 2004 8:56 am
Location: West Sussex, England
Contact:

Turning to you for help in a speed matter

Post by Mark Smithers »

Hi there,

I am running php 4.2.2 on an HP-UX server along side with MySql 3.23.42 and apache 1.3.27 and these are pretty much rock solid for me.

But, I'm having a bit of a performance issue and was hoping that you guys & girls can help me out.

I have a table that is about 9000 records and grows at the rate of a few hundred a day (so it aint large by any means!) but what is really painful is dumping this data into an HTML table and then showing it to a user. I have looked at what is happinging within my code and can see that I'm going to the database for each and every record and I can see that this is taking a long time to do, so what is the best method of retrieving large(ish) amounts of data from a database and dumping it into a tabl
e?

Thanks for reading and maybe jotting down a clue or two

Mark
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

i guess the slow down isn't actually the connection to the database. It is the HTML generated to produce 9000 rows in a table that is the slow part.

I would suggest paginating the results.

Mark
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

Post by AVATAr »

do you need to show all de 9xxx records to the user??? why not paginating the records.. so you can show like 200 a page?

limit your query.. search this forum for pagination you'll fin the answer
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

Post by AVATAr »

60 secs later ja!
Post Reply