![]() |
|
#1
|
|||
|
|||
speed up the loading timethe site developed uses php and database used is mysql.it takes a lot of time for the site to get loaded than other ordinary site.it does database access before each page to be displayed.is there any method to increase the speed.will the objectoriented feature of php help in speeding up the site .Is the database access making problem.how to overcome this.
|
|
#2
|
|||||
|
|||||
|
Quote:
Quote:
Quote:
Quote:
Quote:
__________________
Cow: You're a lawyer too? Mooseblood (mosquito): Ma'am, I was already a bloodsucking parasite. All I needed was a briefcase! |
|
#3
|
||||
|
||||
|
Hello rose,
When I have issues with my own website(s), 9 out of 10 times, the issue is with MySQL. So, I am almost certain that you're looking in the right direction. Now what you can do to eliminate (issues with) or optimise your MySQL server depends on whether you're hosted on a shared hosting plan or if you're managing your own box. The first place you'd want to check is the information supplied by the MYSQL server itself... Code:
With this information you can then proceed to optimise the mysqld variables such the table_cache and key_buffer_size etc. There are of course a whole lot of other stuff you should be looking at too like the slow query log and how each query in your scripts are created, optimised and "explain"ed. As WaltP already mentioned - without details, it's hard to suggest any one thing in particular. __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#4
|
||||
|
||||
|
Much of my site gets loaded from MySQL. One thing I'm considering is to have completed template pages written to .html files, after they have been read and contructed into HTML code. I am positive that there is a way to do this, but so far, I have not had a chance to write the necessary code and look up the functions that I'll need to use.
|
|
#5
|
|||
|
|||
|
function func_futureamount($cnn_cs,$str_year_from,$str_mont h_from,$iDisplayNumber,$sessionlogin){
$qry_bank="select * from cs_bank where bank_paybackday !=-1 "; --------------- --------------- for($iloop=1;$iloop<=$num;$iloop++){//execute for for no of rows selected by above condition eg=10 rows $rst_bankday=mysql_fetch_array($rst_bank); //then in each loop fetches a set of rows $qry_transdetails=" SELECT checkorcard, STATUS , cancelstatus, companyname, r_chargeback ,r_credit , r_discountrate , r_transactionfee ,r_reserve , accounttype, cardtype,reason,passstatus,amount,voiceauthfee,gat eway_id,reseller_id ,admin_approval_for_cancellation FROM cs_transactiondetails, cs_companydetails WHERE "; $qry_transdetails.=" cs_transactiondetails.userid = $sessionlogin and cs_companydetails.userid= $sessionlogin and transactionDate >='$todate' and transactionDate <= '$enddate' and bank_id=$ibankid and checkorcard='H' and gateway_id ='-1' Order by cs_transactiondetails.userid"; $inum1=mysql_num_rows($show_transdetails);//execute for for no of rows selected by above condition eg=15000 rows and select almost 500 rows -------------------(calculations for ($iloop2=1;$iloop2<=$inum1;$iloop2++){ $rst_transdetails= mysql_fetch_array($show_transdetails); $qry_bankexit="select * from cs_transactiondetails where bank_id='$ibankid' and userId=$sessionlogin and transactionDate <'$todate'"; $qry_addcancels="SELECT checkorcard, STATUS , cancelstatus, companyname, r_chargeback ,r_credit , r_discountrate , r_transactionfee ,r_reserve , accounttype, cardtype,reason,passstatus,amount,voiceauthfee,gat eway_id,reseller_id,admin_approval_for_cancellatio n,currencytype,cancel_refer_num FROM cs_transactiondetails, cs_companydetails WHERE "; $qry_addcancels.=" cs_transactiondetails.userid =$sessionlogin and cs_companydetails.userid=$sessionlogin and transactionDate >= '$cancelstartdate' and transactionDate <= '$cancelenddate' and bank_id= $ibankid and cancelstatus='Y' and admin_approval_for_cancellation ='R' and cancellationDate < '$cancelstartdate' and checkorcard='H' and gateway_id ='-1' Order by cs_transactiondetails.userid "; $num_add=mysql_num_rows($rst_addcancels);//execute for for no of rows selected by above condition eg=15000 rows and select almost 500 rows ---------------- //fuction ends here } this fuction called atleast 4 times when the page .i have to do this database accesss to make the calculation also i want to get the output displayed soon.now how can i increase the speed . |
Recent GIDBlog
Toyota - 2008 July Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [CONTEST?]Data Structure Test | dsmith | C Programming Language | 2 | 06-Jun-2004 15:13 |
| Re: Programming Techniques | WaltP | C Programming Language | 0 | 09-Mar-2004 23:56 |
| Alexa testing site speed - Desilva.biz in top 1% ! | jrobbio | Web Hosting Forum | 5 | 17-Jan-2004 18:30 |
| time Problem | zuzupus | MySQL / PHP Forum | 9 | 24-Jul-2003 07:02 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The