Jump to content
Sign in to follow this  
yesudo

Automatic Database Optimization

Recommended Posts

http://www.oscommerce.com/community/contributions,3075

 

Allows store database to be automatically optimized.

 

Period between optimizations can be configured in admin.

 

This version is more secure than my previous version of this contribution - so I would suggest if you have the old version - replace with this.


Your online success is Paramount.

Share this post


Link to post
Share on other sites

Automatic Database Optimization

This contribution does not work:

Fatal error: Call to undefined function: tep_db_query() XXXdata_base.php on line 5

 

That's actually the first line of code:

 

$query = tep_db_query("select TO_DAYS(NOW()) as today, TO_DAYS(start_date) as start_date, counter from optimize_check");

 

Contribution is located here:

http://www.oscommerce.com/community/contributions,3075

 

Anyone have an idea how to fix this?

Share this post


Link to post
Share on other sites

Did you definately put:

 

require(DIR_FS_ADMIN . 'optimize_db.php');

 

After:

 

require('includes/application_top.php');

 

in admin/index.php ?


Your online success is Paramount.

Share this post


Link to post
Share on other sites
Did you definately put:

require(DIR_FS_ADMIN . 'optimize_db.php');

After:

require('includes/application_top.php');

in admin/index.php ?

 

Thank you very kindly for your reply.

 

I renamed the file to opti_data_base.php

and I placed

require(DIR_FS_ADMIN . 'opti_data_base.php');

right after

require('includes/application_top.php');

in admin/index.php

 

It is not optimizing the tables in the database.

What to check next?

 

Again, thank you

Share this post


Link to post
Share on other sites

Hello Dennis,

 

I have this working fine on quite a few other sites.

 

If you want to pm me your ftp and admin details I am happy to take a look.


Your online success is Paramount.

Share this post


Link to post
Share on other sites

Am I correct in thinking that calling the optimize_data_base.php file with my browser should optimize the data base?

Share this post


Link to post
Share on other sites
Am I correct in thinking that calling the optimize_data_base.php file with my browser should optimize the data base?

 

No.

 

This file is called by index.php in your admin area so it uses the call to application_top.php from that file, which calls the function defines, as it is the automated version of this contrib.

 

If you want to run it manually the contribution has been modified here to allow that:

 

http://www.oscommerce.com/community/contri...h,database+opti


Your online success is Paramount.

Share this post


Link to post
Share on other sites
No.

 

This file is called by index.php in your admin area so it uses the call to application_top.php from that file, which calls the function defines, as it is the automated version of this contrib.

 

If you want to run it manually the contribution has been modified here to allow that:

 

http://www.oscommerce.com/community/contri...h,database+opti

 

Then I am probably dead wrong in saying that this is not working for me as I was calling the file from my browser and did not see results in mysql tables and assumed it wasn't working. My sincere apologies.

Share this post


Link to post
Share on other sites

HI

 

I have just downloaded and configure my site with the manual update of optomization, and seem to run into a small problem

 

When i click the optimise button from my admin page it seems like it is updating and then all of a sudden it shows me the admin login page.. and it has become even slower any help would be great.

Share this post


Link to post
Share on other sites

I don't have an answer for you except to say that you are inthe wrong support thread. It sounds like you are using the contribution Emmett mentions above. You might want to try asking in the thread for that contribution.

 

Jack

Share this post


Link to post
Share on other sites
I don't have an answer for you except to say that you are inthe wrong support thread. It sounds like you are using the contribution Emmett mentions above. You might want to try asking in the thread for that contribution.

 

Jack

 

 

I am pretty sure i am in the correct thread, as i have loaded the automatic database optimisation, but head into loads of problems, like if i log out and log back in or go back to the index page in the admin panel then it gives me an error to say that the file is in use.. hence i tried the manual option..

 

if so could you direct me to the correct thread... can't seem to fine it.

Share this post


Link to post
Share on other sites

As Jack mentions, this is the support thread for the automatic version, not sure where you will find the thread for the manual one you are trying.

Edited by yesudo

Your online success is Paramount.

Share this post


Link to post
Share on other sites

what does optimization database actually do? How database is being optimized? Deleting unused table?


Best regards,

Koh Kho King

Share this post


Link to post
Share on other sites

You can think of it a defraging your hard drive, if that helps. Over time, empty space develops in the database and running an optimize reclaims that, as well as doing other similar things that makes the database perform better. If you go into phpmyadmin and select your database, you can scroll down and see the total size of the database as well as what is called overhead. This is wasted space which optimizing recovers.

 

Jack

Share this post


Link to post
Share on other sites

Is anyone still using this contribution? I do not think any of the newer db optimization contributions include an automatic feature.

 

I am trying to use it but it is not working for me yet. It runs at the specified interval and send me an email, but the database itself is not optimized. The status of the overhead in the tables is unchanged. The database optimization code is imbedded within if statements. Ir would appear that I am failing one of the if statements but I cannot figure out where the exact problem is. Has anyone else seen this issue?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×