I was wondering by using which technique i can fetch data from database more fast...!!
i have 500 records and i have to do pagination also on it..!! how can i do it more faster...?
i just want to know what professionals do to make there application fast..!! :)

8 Years
Discussion Span
Last Post by innocent.boys

If, for example, you are using a MySQL database, often it will be down to the syntax of your MySQL query.
Perhaps you could select only the fields you need from the database
e.g. use "SELECT `name`, `age`, `address` FROM" instead of "SELECT * FROM". Using "SELECT *" to select everything will dramatically increase server load on large data sets.

If you would like to post your code on here, the people on this forum can probably take a look and offer some specific pointers.


Use Xml instead of direct database..!!
tht will surely fasten ur application

$tariff_id = $_SESSION['tariff'] ;
if(isset($_POST['submit']) && $_POST['submit']!='')
$dial_prefix= $_POST['prefix'];   
$query= "call view_card('$tariff_id','$dial_prefix')";
$query= "call sp_view_ratecard($tariff_id,'')";
$result = mysql_query($query) or die('query_error'.''.mysql_error());

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Voip Billing</title>

<!-- CSS -->
<link rel="stylesheet" href="css/style.css" type="text/css" />

<div id="wrapper">
        <!-- Header --><!-- Menu -->
       <? include_once('menu.php'); ?>
         <!-- Header end -->    <!-- Menu end -->

<hr class="noscreen" />

    <div id="content-box">
        <form action="" name="form1" method="post">
        <table align="center" width="100%" cellpadding="3" cellspacing="3">
                <td align="center" class="heading">View Tariff</td>
                <td align="center" valign="middle" class="text">Enter Dial Prfix 
                <input id='prefix' maxlength="8" onKeyUp="this.value=check(this.value);" value="<?=$_POST['prefix']; ?>" type='text' name='prefix'>
                <input type='submit' onClick="return validate();" name='submit' value="submit"><br><br></td>
        <tr valign="top">
            <td height="350px" align="center">
                <table align="center"  border='1' width="700px" height='60px'>
            <tr class="headingtext_n">
                <td class="header">Sno.</td>
                <td class="header">Prefix</td>
                <td class="header">Destination</td>
                <td class="header">Country Rates</td>   
        { ?> <tr onMouseover="this.bgColor='yellow'"onMouseout="this.bgColor='#FFFFFF'" class="<?= $className; ?>">
        <td align="center"><?= $counter ?></td>
        <td align="right"><?= $row[0]; ?></td>
        <td align="right"><?= $row[1]; ?></td>
        <td align="right"><?= $row[2]; ?></td>
        <? $counter=$counter+1;?>
        <tr class="headingtext_n">
            <td class="header">&nbsp;</td>
            <td class="header"></td>
            <td class="header"></td>
            <td class="header"></td>
	<br />
    <!-- Footer -->
    <? include_once('footer.html'); ?>
    <!-- Footer end -->

this is my code.. its very simple one..
I want to put pagination on it.. but i dont want to call procedure again and again.. by changing pages..!!!

how can i make it more fast and better..!! :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.