GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 28-Oct-2004, 00:07
rose rose is offline
New Member
 
Join Date: Jul 2004
Posts: 5
rose is on a distinguished road
Angry

speed up the loading time


the 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  
Old 28-Oct-2004, 18:57
WaltP's Avatar
WaltP WaltP is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Midwest US
Posts: 3,335
WaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to all
Quote:
Originally Posted by rose
the site developed uses php and database used is mysql.
What site? Are we supposed to know it?

Quote:
Originally Posted by rose
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.
Depends on 100's of factors. You don't give us any information so it's hard to tell...

Quote:
Originally Posted by rose
will the objectoriented feature of php help in speeding up the site .
Probably not.

Quote:
Originally Posted by rose
Is the database access making problem.
Probably.

Quote:
Originally Posted by rose
how to overcome this.
Not a clue how to overcome -- have no idea what you're doing. Too many details are missing to diagnose.
__________________

During the election they said Obama could only be elected when pigs fly. Well, we currently have an epidemic of Swine Flu. Coincidence?
  #3  
Old 29-Oct-2004, 07:43
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
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:
mysql> SHOW STATUS

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.
  #4  
Old 29-Oct-2004, 20:55
JasonMichael's Avatar
JasonMichael JasonMichael is offline
Awaiting Email Confirmation
 
Join Date: Jul 2004
Posts: 135
JasonMichael has a spectacular aura about
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  
Old 01-Nov-2004, 04:31
rose rose is offline
New Member
 
Join Date: Jul 2004
Posts: 5
rose is on a distinguished road
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 GIDBlogOnce again, no time for hobbies by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[CONTEST?]Data Structure Test dsmith C Programming Language 2 06-Jun-2004 16:13
Re: Programming Techniques WaltP C Programming Language 0 10-Mar-2004 00:56
Alexa testing site speed - Desilva.biz in top 1% ! jrobbio Web Hosting Forum 5 17-Jan-2004 19:30
time Problem zuzupus MySQL / PHP Forum 9 24-Jul-2003 08:02

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 22:47.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.