You are here:  » more than 300,000 articles in the feed, and startpage does not open

Support Forum



more than 300,000 articles in the feed, and startpage does not open

Submitted by rolli1 on Wed, 2012-05-02 10:18 in

Hi David,
when I go to my website {link saved} then the startpage opens with everything, but not with the database content. The page stays at: waiting for {link saved}".

With my other websites I do not have this problem but the database content there is only up to 18,000.
Does long loading of the page come from the large database, or is there another reason which I do not discover since now, and if yes, would it be possible to cut the feed into 3 or 4 pieces and import it this way?

Regards

Roland

Submitted by support on Wed, 2012-05-02 15:05

Hi Roland,

I wonder if you might be using a random Featured Products modification; because that would almost certainly require fine-tuning with such a large database.

If that is the case, check out the latest Random Featured Products thread here and look at the second part of the post about the caveat for large databases, and a modification to make it pick a random merchant and then random products from that merchant, I think that will make all the difference with so many products..!

Cheers,
David.
--
PriceTapestry.com

Submitted by rolli1 on Thu, 2012-05-03 09:34

Hi David,
I have seen that before. The thing is that these large datafeed is from 1 merchant only. so perhaps it would be usefull to select first a category.
Would this code be correct?

"$sql = "SELECT DISTINCT(category) AS CATEGORY FROM `".$config_databaseTablePrefix."products` ORDER BY RAND() LIMIT 1";
   database_querySelect($sql,$result);
   $category = $result[0]["category"];
   $sql = "SELECT name,1 AS sequence FROM `".$config_databaseTablePrefix."category` WHERE category='".database_safe($merchant)."' ORDER BY RAND() LIMIT 3";"

Regards

Roland

Submitted by support on Thu, 2012-05-03 10:43

Hi Roland,

Almost - watch case in the SQL and check for empty category - have a go with:

$sql = "SELECT DISTINCT(category) AS category FROM `".$config_databaseTablePrefix."products` WHERE category <> '' ORDER BY RAND() LIMIT 1";
   database_querySelect($sql,$result);
   $category = $result[0]["category"];
   $sql = "SELECT name,1 AS sequence FROM `".$config_databaseTablePrefix."category` WHERE category='".database_safe($category)."' ORDER BY RAND() LIMIT 3";"

Cheers,
David.
--
PriceTapestry.com

Submitted by rolli1 on Fri, 2012-05-04 08:29

Thanks for that......

Regards

Roland