Way to speed up paint sourced from 8000 row mysql table
Way to speed up paint sourced from 8000 row mysql table
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]
[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]
This discussion has been closed.
Replies
Allan