Hello,
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
Does database influence page load?
Moderator: General Moderators
Re: Does database influence page load?
Yep, number of records has an impact on page load time.... but...
If its just a simple SELECT query you don't need to worry. MySQL can easily handle millions of records
On some point you may have to paginate the list to reduce data send between web server and user on every request.
Here's an example
http://www.sitepoint.com/perfect-php-pagination/
If its just a simple SELECT query you don't need to worry. MySQL can easily handle millions of records
On some point you may have to paginate the list to reduce data send between web server and user on every request.
Here's an example
http://www.sitepoint.com/perfect-php-pagination/
Re: Does database influence page load?
Thank you maxxx99, I have done a pagination, but even if I use the pagination i will include in my code to: select * from TABLE, which will get all data to count them
than I will use the select * from TABLE LIMIT $a,$b or whatever ...
And Yes am using mysql, and am talking about not more than 50 000 data in the students list (the table executed using pagination, but calling all student to count them all is required to make the math logic for the pagination)
tic toc tic toc
Hope I explained correctly =) THANK YOU AGAIN ^^
And Yes am using mysql, and am talking about not more than 50 000 data in the students list (the table executed using pagination, but calling all student to count them all is required to make the math logic for the pagination)
tic toc tic toc
Hope I explained correctly =) THANK YOU AGAIN ^^
Re: Does database influence page load?
You really shouldn't use SELECT *, well, ever. Certainly not for counting the number of records.
Re: Does database influence page load?
amirbwb wrote:[...] i will include in my code to: select * from TABLE, which will get all data to count them [...]
Code: Select all
SELECT COUNT(*) AS `num_rows` FROM `my_table`Re: Does database influence page load?
Exec another query as McInfo proposed, this will count all of the records for you on db side
no need to fetch whole db
Re: Does database influence page load?
mm thank you both ...