You are here:  » time taken for products to removed from database

Support Forum



time taken for products to removed from database

Submitted by wilkins on Thu, 2008-07-24 08:31 in

Hi

We have a couple of sites that have a large mount of products, we use sh files and crons to automate the updates, our problem is the time it takes for the products to be delisted from the database before the new products can be inserted, recently we have been deleting all the products from the database manually using phpmyadmin, this cuts down the time by 90%.

My question is, has anybody a way to automate this through an sh file? If we could do this it would reduce the udate time.

Thanks

Brent

Submitted by support on Thu, 2008-07-24 11:51

Hello Brent,

If you are using import.php with the @ALL parameter then it should be quick as this uses a TRUNCATE statement to empty the products table in one (presumably the same SQL as used by phpMyAdmin).

Therefore, if you are using some other method (let me know what you are using in your .sh script to do the import) it should be easy enough to code a utility script to automate this...

Cheers,
David.

Submitted by wilkins on Thu, 2008-07-24 12:40

Hi David

We have always used @modified parameter as we have split the import into blocks so we only want to import what has updated. Does this use a different statement?

ie

Thanks

Brent

Submitted by support on Thu, 2008-07-24 13:04

Hi Brent,

Yes - @MODIFIED doesn't trigger a TRUNCATE call as it can only delete products for merchants that are being imported. This uses a normal "DELETE FROM products WHERE merchant='....'" style query, which can be slow on a large table.

What method is it you are using within phpMyAdmin to speed things up as it should be easy enough to replicate that within a utility script...?

Cheers,
David.

Submitted by wilkins on Thu, 2008-07-24 13:56

Hi David

Now I know that @ALL will trigger TRUNCATE call I can now redo my sh files to use this and see if I can do all the files overnight.

Thanks for the help.

Brent