Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Automatic Database Optimization


yesudo

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.

Link to comment
Share on other sites

  • 8 months later...

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?

Link to comment
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

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

  • 10 months later...

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.

Link to comment
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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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.

Link to comment
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.

Link to comment
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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 1 year later...

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...