Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Big size table dataflow_batch_import
 
Silebis
Jr. Member
 
Avatar
Total Posts:  30
Joined:  2008-01-15
Opava
 

Hello, i have only one question. Can i trunctable table dataflow_batch_import. My table contain 180k rows that´s about 200MB.
If not, exist any solutions to resize them?

 
Magento Community Magento Community
Magento Community
Magento Community
 
advocat
Sr. Member
 
Avatar
Total Posts:  99
Joined:  2008-01-03
UA Kyiv
 

After import/export - running clean batch procces
If the import or export is not successful completely - batch data is not deleted
Garbage collectors unfortunately don’t exists
I hope appears in the new versions

If you don’t perform any actions with Dataflow - you can clear (truncate) the tables dataflow_batch * manually

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bing Dicklepuss
Sr. Member
 
Total Posts:  91
Joined:  2010-07-26
 

Please tell me what dataflow_batch_import and dataflow_batch_export are for and why (or why not) it is possible to delete them?
(Why would such large tables be created by Magento if they are useless?)

We are having problems restoring from backup with a db that has a dataflow_batch_import table of 112 MiB.

That is much larger even than our catalog_product_entity_varchar which is only 39.6 MiB.

It would be great to delete the dataflow_batch_import and dataflow_batch_export files but I would like to know what they do before I delete them.

This Post (on Deleting Magento tables to save space) on the magento forums says NOT to delete any tables except those that start with “log”.
http://www.magentocommerce.com/boards/viewreply/97007/

Again, please provide any more information if you can.

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiefair
Mentor
 
Avatar
Total Posts:  1848
Joined:  2009-06-04
 

You don’t delete them, you truncate them, both dataflow_batch_import and dataflow_batch_export can have problems with their housekeeping if you don’t allocate enough resources to Magento. The usual way is to run a program to clean them out. Nexcess has a script for doing this...

They are temporary work files for import and export by dataflow. On some peoples systems they’ve been seen to grow over a gigabyte… Cool eh?

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiefair
Mentor
 
Avatar
Total Posts:  1848
Joined:  2009-06-04
 

Use this script to monitor the bloat in various log files, including dataflow...

 
Magento Community Magento Community
Magento Community
Magento Community
 
techsupporthp
Jr. Member
 
Total Posts:  10
Joined:  2011-02-15
 

Thanks for the answer my dataflow_batch_export table is 4.4Gb and the batch import is 687MB

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bing Dicklepuss
Sr. Member
 
Total Posts:  91
Joined:  2010-07-26
 

By the way, I’ve truncated (not deleted) those tables without any problem.  Those tables just record every single bit of information that was handled in an export or an import.  They could be useful for reversing/undoing changes, but I don’t think any such functionality has been built yet.

 
Magento Community Magento Community
Magento Community
Magento Community
 
VanGilsWeb
Sr. Member
 
Total Posts:  97
Joined:  2010-03-26
 

Is there a way to auto truncate tables after import/export has finished???

 
Magento Community Magento Community
Magento Community
Magento Community
 
MarketingInfo
Jr. Member
 
Avatar
Total Posts:  1
Joined:  2012-11-06
Rimini
 

I use this php script. You cano invoke from browser or
you can put it under cron and run it once a day.
Otherwise you can do it with a sql script.

<?php

$myLog="pippo.log"; //in var/log

//getting Magento
require_once $root.'app/Mage.php';
ob_implicit_flush();
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

//clean dataflow_batch_import/export table
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
$db->query("TRUNCATE TABLE `dataflow_batch_import`");
Mage::log("Table dataflow_batch_import cleaned", null, $myLog);
$db->query("TRUNCATE TABLE `dataflow_batch_export`");
Mage::log("Table dataflow_batch_export cleaned", null, $myLog);

?>

 
Magento Community Magento Community
Magento Community
Magento Community
 
BlueclawEcomm
Member
 
Avatar
Total Posts:  35
Joined:  2010-06-25
Leeds, UK
 

just been working on a site that was having issues with it’s automated back up. Turns out over the years this table had become 58GB in size! truncated it and excluded it from future backups as I assume it is not actually required to restore a site from.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top