Forum
Import big collection
Hi,
I want to import a big collection with the import script. file is 6,9 MB and there are 6000 rows importing work The problem is that de import script is very slow. One row in 40 seconds and stop after 206 items.
This is the begin of the import script.
try {
$Importer->add_item([
"datafeedtitle" => "Chobe & Victoria Falls",
"datafeedland" => "false",
"datafeedcontinent" => "unknown",
"datafeedbeschrijving" => "U kunt uw reis aan het Chobe National Park in Botswana goed combineren met een bezoek aan de Victoria Falls. Dit natuurwonder kunt u zowel in Zimbabwe als in Zambia bewonderen. De afstand tussen Chobe of Kasane en de Victoria Falls is ongeveer anderhalf uur en dus prima op een dag te bereizen.",
"datafeedprijs" => "1035",
"datafeedaanbieder" => "Tenzing",
"datafeedsoortreis" => "leeg",
"datafeedduurreis" => "5",
"datafeedlink" => "https://www.tenzingtravel.nl/tradetracker/?tt=809_408394_5314_reizen-feed&r=https%3A%2F%2Fwww.tenzingtravel.nl%2Fafrika%2Fcombinatie-arrangement%2Fchobe-en-victoria-falls",
"datafeedfoto" => "https://www.tenzingtravel.nl/ccdimage/34074029",
]);
} catch (Exception $e) {
die('Error: '.$e->getMessage());
}
try {
$Importer->add_item([
"datafeedtitle" => "Chobe National Park",
"datafeedland" => "false",
"datafeedcontinent" => "unknown",
"datafeedbeschrijving" => "Tijdens deze vierdaagse reis door Botswana, gaat u het Chobe National Park optimaal verkennen. U verblijft in een accommodatie naar keuze en u kunt de lengte van het arrangement zelf bepalen. Des te langer u in een bepaalde accommodatie verblijft, des te voordeliger de prijs per nacht.",
"datafeedprijs" => "365",
"datafeedaanbieder" => "Tenzing",
"datafeedsoortreis" => "leeg",
"datafeedduurreis" => "4",
"datafeedlink" => "https://www.tenzingtravel.nl/tradetracker/?tt=809_408394_5314_reizen-feed&r=https%3A%2F%2Fwww.tenzingtravel.nl%2Fafrika%2Fcombinatie-arrangement%2Fchobe-national-park",
"datafeedfoto" => "https://www.tenzingtravel.nl/ccdimage/34083528",
]);
} catch (Exception $e) {
die('Error: '.$e->getMessage());
}
Is it normal that the import script is so slow? How can I import so many rows at once?
I hope someone can give me a answer. I need the importing to import some datafeeds and what it to use it with a cronjob.
Do you need to import it all at once? How long does it take to do, say, 100 rows?
I will be easier if I can import them all at once. But if it go faster to do it in a batch of 100 rows at the time then that wil be oke. But that wil not be the case. I try to import 23 rows and every row take 20-30 seconds time to import. See
Is that normal? Can i speed up the import? Is my import file wrong?
Update. It look like it get's one a loop and run again from the start. I that possible?
No, that's not normal to be that slow.
Oke, Is there by a way to find out what the problem is? I am lost at this point and i really want to use the import script to show the datafeeds. But i don,t no where I have to look to find the problem.
Update I find the problem MariaDB was type InnoDB. I change to MyISAM speed is now normal