I use this query:
$result_members = mysql_query("SELECT * FROM members");
The results are displayed in a table on my admin page like this:
while($row = mysql_fetch_array($result_members))
{
$id = $row['id'];
$firstname = $row['firstname'];
...
<tr>
<td><? echo "$id"; ?></td>
<td><? echo "$firstname"; ?></td>
...
</tr>
}
I use jQuery pagination which displays 50 rows per page, and jquery Autocomplete to search in table.
Both loading and search takes alot of time. From several seconds up to a minute. I have about 5.000 members in my db.
I reckon there’s a better way to do this. I’m not experienced in mysql, so if you could show me a simple way to make this work smoothly, I’d be really happy! 🙂
Regards
Virik
It may be not only database related slowdown. It can be also caused by your computer processing HTML at first, then jQuery pagination. Anyway, it is not a good idea to query 5000 rows and display them on the same page, although they are paginated.
Maybe you would be interested in flexigrid.info – a nice javascript solution that displays data from your database. It not only loads data as you need it, but also allows sorting and some manipulations(row adding and deleting).