Way to speed up paint sourced from 8000 row mysql table

Way to speed up paint sourced from 8000 row mysql table

personaltpersonalt Posts: 4Questions: 0Answers: 0
edited February 2011 in General
I have a mysql fed table that pre jquery took about 10 seconds to paint the full table with 8000 rows. Taking the table and feeding it into the datatable function takes the run time to about 25 seconds. Can anyone provide any information of how to make this paint faster?


[code]
<?php require_once('Connections/local.php'); ?>
<?php
mysql_select_db($database_local, $local);
$query_rs_data = "SELECT * from tbl_test";
$rs_data = mysql_query($query_rs_data, $local) or die(mysql_error());
$row_rs_data = mysql_fetch_assoc($rs_data);
$totalRows_rs_data = mysql_num_rows($rs_data);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


Untitled Document



<!-- Needed for jquery table support --->











$(document).ready(function() {
$('#example').dataTable({
"iDisplayLength": 50,
"aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]]
});
} );












AAA
BBB
CCC
DDD





<?php do { ?>

 
<?php echo $row_rs_data['AAA']; ?> 
<?php echo $row_rs_data['BBB']; ?>
<?php echo $row_rs_data['CCC']; ?>
<?php echo $row_rs_data['DDD']; ?> 




<?php } while ($row_rs_data = mysql_fetch_assoc($rs_data)); ?>






<?php
mysql_free_result($rs_data);
?>
[/code]

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    There is an FAQ about this: http://datatables.net/faqs#speed . Typically I've found that the point you want to start considering server-side processing is around 2000-3000 rows for IE. If you don't care about IE, then the other browsers should cope with 8000 reasonably well, although probably approaching the limit. It would be worth seeing how quickly the data is loading as well.

    Allan
This discussion has been closed.