Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Database Auto-Optimizer

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 12-05-2005, 11:59 PM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default

Just out of interest before i run this, is there any danger of this script screwing up the database???
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #12  
Old 12-07-2005, 08:45 AM
 
NuAlpha NuAlpha is offline
 

X-Adept
  
Join Date: Aug 2003
Location: US
Posts: 598
 

Default

Quote:
Originally Posted by cotc2001
Just out of interest before i run this, is there any danger of this script screwing up the database???

Not that I am aware of. Should do just the opposite and correct periodic problems with the database!
__________________
X-Cart Pro 4.5.5 Platinum
X-Payments 1.0.6
PHP 5.3.14
MySQL 5.1.68
Apache 2.2.23
Reply With Quote
  #13  
Old 03-08-2006, 11:27 PM
 
Online Michael Online Michael is offline
 

eXpert
  
Join Date: Mar 2005
Location: Melbourne, Australia
Posts: 273
 

Default

I'm wondering if someone can tell me whether IБ─≥m doing this correctly.

I created and pasted the first code and saved it as db_optimised.php in the root directory of the cart (as instructed). I edited this file to include my URL with the ' /log' extension. I then opened my browser and entered my URL with the 'db_optimised.php' extension. When I hit enter, all I see is my home page reloading. Does the optimising happen this quickly or am I doing something wrong?

Oh, and regarding cron jobsБ─╕ IБ─≥ve never done them so IБ─≥m just happy to do it this way (manually) once a month or does it have to be done daily for best results?
__________________
X-Cart 5.3.5.4
Reply With Quote
  #14  
Old 03-10-2006, 12:36 PM
 
NuAlpha NuAlpha is offline
 

X-Adept
  
Join Date: Aug 2003
Location: US
Posts: 598
 

Default

Quote:
Originally Posted by Online Michael
I'm wondering if someone can tell me whether IБ─≥m doing this correctly.

I created and pasted the first code and saved it as db_optimised.php in the root directory of the cart (as instructed). I edited this file to include my URL with the ' /log' extension. I then opened my browser and entered my URL with the 'db_optimised.php' extension. When I hit enter, all I see is my home page reloading. Does the optimising happen this quickly or am I doing something wrong?

Oh, and regarding cron jobsБ─╕ IБ─≥ve never done them so IБ─≥m just happy to do it this way (manually) once a month or does it have to be done daily for best results?

You don't want to enter your URL. You should enter absolute path to your files.

After you run this script you won't see anything as it is not designed to show any such output.

If you are going to run it manually I recommend doing so every 5 days or so, depending on how heavy your site traffic is or how often your database tables are modified.
__________________
X-Cart Pro 4.5.5 Platinum
X-Payments 1.0.6
PHP 5.3.14
MySQL 5.1.68
Apache 2.2.23
Reply With Quote
  #15  
Old 03-20-2006, 12:43 PM
 
jdedba jdedba is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 96
 

Default

NuAlpha,

Thank you for sharing your script.

Can you echo the start time and end time into a log file even the script runs sucessfully? In that way, we can monitor the cron job which is usually managed by hosting workers.

Regards,

Jeff
__________________
version 4.1.1
Reply With Quote
  #16  
Old 03-28-2006, 04:54 AM
 
oracle9i oracle9i is offline
 

Member
  
Join Date: Feb 2006
Posts: 29
 

Default

in the config.php file

Code:
# # Automatic repair of the broken indexes in mySQL tables # $mysql_autorepair = false;


changing that to '=true', would that have a good effect?
__________________
X-CART 4.0.4 (about to upgrade to 4.0.17)
Reply With Quote
  #17  
Old 03-28-2006, 06:44 AM
 
NuAlpha NuAlpha is offline
 

X-Adept
  
Join Date: Aug 2003
Location: US
Posts: 598
 

Default

Quote:
Originally Posted by oracle9i
in the config.php file

Code:
# # Automatic repair of the broken indexes in mySQL tables # $mysql_autorepair = false;


changing that to '=true', would that have a good effect?

Probably a good idea. That is what we have set.
__________________
X-Cart Pro 4.5.5 Platinum
X-Payments 1.0.6
PHP 5.3.14
MySQL 5.1.68
Apache 2.2.23
Reply With Quote
  #18  
Old 04-01-2006, 06:23 AM
 
metinex metinex is offline
 

Advanced Member
  
Join Date: Feb 2006
Posts: 82
 

Default

Don't forget to get your backup before running the scripts mentioned here.

My xcart_languages table turned out to be empty after running one of those scripts.

mysqldump --add-drop-table -u username -ppassword xcart | mysql -u username -ppassword -C xcart_daily

Run this script in the shell to make a backup in the same mysql server. That way you can easily access to your ols data through sql queries.

I would save this command in a file and put that file under /etc/cron.dailly on Linux systems.

Try also cron.weekly, cron.hourly or cron.monthly folder at your convenience.
__________________
Jay S

Xcart 4.1.3 & Mysql 5.0.20
Xcart 4.0.17 & Mysql 4.1
Apache 2.0 & Linux Whitebox 3
Reply With Quote
  #19  
Old 04-01-2006, 06:37 AM
 
patrick24601 patrick24601 is offline
 

Senior Member
  
Join Date: Mar 2006
Location: Oklahoma City, OK
Posts: 183
 

Default

If you are on a cpanel system using the web based cron you don't have to worry about the daily/monthly/hourly crons. Just pic the right times and days and you are done.

I am consider just running an hourly cron php against my system that calls a generic scheduling php script of mine. Then within that control what gets run when (reports, database auto optimize, etc.). Then as all of these cool mods come out there is only script you have to remember running. Helps when it comes to moving and/or upgrading.

P
__________________
---
Patrick Allmond
Xcart 4.0.18
Now on a dedicated linux box
Reply With Quote
  #20  
Old 04-14-2006, 04:52 PM
 
mltriebe mltriebe is offline
 

Senior Member
  
Join Date: Mar 2006
Posts: 137
 

Default

So how can I tell if this is working? I am trying it on my local test copy and can't see any difference in the SQL coding. I have no idea if it is doing anything or not. I know I had some settings wrong in the first few tries but I think I have it all correct now but nothing still seems to be happening.

Thanks
__________________
X-Cart 4.3.1
Buy Together Module, AlteredCart
CDSEO Pro
One Page Checkout, AlteredCart
Smart Search, AlteredCart
On Sale, AlteredCart
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:11 AM.

   

 
X-Cart forums © 2001-2020