You are here:  » best way to import for performace

Support Forum



best way to import for performace

Submitted by paullas on Sat, 2011-11-05 13:13 in

hi david

i know i am talking to you via email but thought i would ask here the hopefully the answer can benefit others.

what is the ebst way to import a feed to get the best db performace:

download feed, then upload to /feeds/ then use the admin import
or
download feed, then upload to /feeds/ the using the import @All in ssh

if import @All is best do you have detailed instructions on how to go about this.

thanks in advance.

Submitted by support on Sat, 2011-11-05 13:25

Hi Paul,

It is always best to use scripts/import.php @ALL (or scripts/cron.php in the latest version) as these will truncate (empty) the products table before the import begins meaning that there will be no fragmentation in the products table.

Documentation for import.php is here; and is intended for use in a CRON job, or command line execution. For the latter, if your hosting account has SSH (command line) access then the procedure would be to first update all your feeds by downloading from the networks and uploading to your /feeds/ folder, and then login to your server and issue the following commands (where $ is the command prompt)

$cd path/to/pricetapestry/scripts
$php import.php @ALL

Cheers,
David.
--
PriceTapestry.com

Submitted by paullas on Sat, 2011-11-05 15:36

hi david

thats great, do you have to import the feeds in the /admin/ first before using

$cd path/to/pricetapestry/scripts
$php import.php @ALL

or can you just upload the feeds into the /feeds/ folder and then run the import.php @ALL

Submitted by support on Sat, 2011-11-05 15:41

Hi Paul,

There is no need to use /admin/ at all - after uploading updated feeds you can go straight to import.php @ALL from the command line for the best performance.

Cheers,
David.
--
PriceTapestry.com

Submitted by paullas on Sat, 2011-11-05 15:48

thats even better, thanks

Submitted by paullas on Sat, 2011-11-05 15:53

ok ive done the above but i only get the following message

backfilling reviews...[done]

and when i look in the /admin/ the feed hasnt been imported.

any ideas?

Submitted by support on Sat, 2011-11-05 15:57

Hi Paul,

That indicates that the feed folder is still empty - I recall from our email conversation that you delete feeds after import; so before running import.php @ALL you will need to re-upload the latest version of each feed to your common /feeds/ folder (as indicated by $config_feedDirectory in config.advanced.php)

Cheers,
David.
--
PriceTapestry.com

Submitted by paullas on Sat, 2011-11-05 16:04

hi david

i downloaded the latest version (today) and have put a feed in the /feeds/ folder but still get the same message

Submitted by support on Sat, 2011-11-05 16:10

Hi Paul,

I know that you are running a multi-installation site with a common feeds folder, so double-check that the at least one of the feeds showing as registered within the installation that you are running import.php @ALL in exists in the feeds folder specified by $config_feedDirectory in the associated config.advanced.php. If that all looks OK, go to /admin/ and if you could confirm that you are able to import manually by clicking the Import link alongside the same feed...

Cheers,
David.
--
PriceTapestry.com

Submitted by paullas on Sat, 2011-11-05 16:13

hi david

all looks ok as i have this

$config_feedDirectory = "../feeds/";

if i go in the /admin/ yes i can import it ok

thanks

Submitted by support on Sat, 2011-11-05 16:24

Hello Paul,

Everything sounds OK, please could you email me the URL of the installation; the value of Install Path from admin > Support Info and also if possible a log (simply copy and paste into an email) of every command issues from logging in via SSH to running php import.php....

Cheers,
David.
--
PriceTapestry.com