I want to know if I am doing a list of students, which are executed from database (mysql),

does the number of data influence in the speed of the page load?

if yes:
What to do ?

And for how much data should I start to think for a solution ?

Thank you

Recommended Answers

All 4 Replies

The actual number of records being read from the database shouldn't have much impact unless it is really large. If you are displaying a very long list on a web page that will have some impact. The solution to that is to use "pagination" to display a fixed number at a time with navigation button to move forward or backward. There are JQuery modules and sample PHP code available if you do a search on "pagination".

Together with chrishea suggestions you can:
1. cache queries on mysql
2. run tables in memory engine (a copy of the original)
3. cache result to a file or better cache php
4. cache results to memory through memcached

For reference:
1. http://dev.mysql.com/doc/refman/5.1/en/query-cache.html
2. http://dev.mysql.com/doc/refman/5.5/en/memory-storage-engine.html
3. http://php.net/manual/en/book.apc.php
4. http://php.net/manual/en/book.memcached.php

bye :)

I am using the pagination, but the question is even if i use pagination,
in the code there will be

mysql_query('select * from TABLE')


mysql_query('select * from TABLE LIMIT $a,$b')

because first I should count all data and than do a math trick !!

mmm ...

Thank you anyway =)

@cereal I didn't get my answer in these pagse ... sorry
But thank you anyway

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.