Borrar Datos de Registro de Magento


Tengo una pregunta con respecto a la limpieza de los datos de registro en Magento.

Tengo más de 2.3 GB de datos en Magento 1.4.1, y ahora quiero optimizar la base de datos, porque es demasiado lenta debido al tamaño de los datos. Revisé la información de registro (URL,Visitantes) y muestra más de 1.9 GB. Si borro directamente esos registros, ¿afectará a alguna funcionalidad en el sitio? ¿Cómo puedo borrar los detalles del registro? Al borrar esos datos voy a tener o perder cualquier dato en mi sitio?

 52
Author: Joseph Mastey, 2010-09-03

15 answers

No hay necesidad de hacer esto usted mismo, el sistema Magento tiene un incorporado para la limpieza de la información de registro. Si vas a

System > Configuration > Advanced > System > Log Cleaning

Puede configurar su tienda para limpiar automáticamente estos registros.

 67
Author: Alan Storm,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-07-28 17:55:40

Limpieza de los registros de Magento usando SSH:

Inicie sesión en el panel shell(SSH) y vaya con la carpeta root/shell.

Ejecute el siguiente comando dentro de la carpeta shell

php -f log.php clean

Introduzca este comando para ver el tamaño de los datos de registro

Php-f log.estado de php

Este método le ayudará a limpiar la forma muy fácil de los datos de registro.

 60
Author: Maniprakash Chinnasamy,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-03-05 10:25:16

Intenta:

TRUNCATE dataflow_batch_export;
TRUNCATE dataflow_batch_import;
TRUNCATE log_customer;
TRUNCATE log_quote;
TRUNCATE log_summary;
TRUNCATE log_summary_type;
TRUNCATE log_url;
TRUNCATE log_url_info;
TRUNCATE log_visitor;
TRUNCATE log_visitor_info;
TRUNCATE log_visitor_online;
TRUNCATE report_viewed_product_index;
TRUNCATE report_compared_product_index;
TRUNCATE report_event;
TRUNCATE index_event;

También puede consultar el siguiente tutorial:
http://www.crucialwebhost.com/kb/article/log-cache-maintenance-script/

Gracias

 46
Author: MagePsycho,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-11-20 10:57:26
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE dataflow_batch_export;
TRUNCATE dataflow_batch_import;
TRUNCATE log_customer;
TRUNCATE log_quote;
TRUNCATE log_summary;
TRUNCATE log_summary_type;
TRUNCATE log_url;
TRUNCATE log_url_info;
TRUNCATE log_visitor;
TRUNCATE log_visitor_info;
TRUNCATE log_visitor_online;
TRUNCATE report_viewed_product_index;
TRUNCATE report_compared_product_index;
TRUNCATE report_event;
TRUNCATE index_event;
SET FOREIGN_KEY_CHECKS=1;
 8
Author: Umesh Kumar,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-02-24 11:06:15
TRUNCATE `log_url_info`;
TRUNCATE `log_visitor_info`;
TRUNCATE `index_event`;
TRUNCATE `log_visitor`;
TRUNCATE `log_url`;
TRUNCATE `report_event`;
TRUNCATE `dataflow_batch_import`;
TRUNCATE `dataflow_batch_export`;

Solo lo uso.

 4
Author: sjolzy,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-01-18 15:07:30

Limpieza de registros a través del Panel de Administración de Magento

Este método es más fácil para los propietarios de tiendas no técnicas que no quieren' meterse directamente con la base de datos de la tienda Magento. Para activar la opción de limpieza de registros en Magento, simplemente haga lo siguiente:

Inicie sesión en su Panel de administración de Magento. Vaya a System = > Configuration. A la izquierda, bajo Avanzado, haga clic en Sistema (Avanzado = > Sistema). Debajo del sistema verá la opción "Limpieza de registros". Rellene los valores deseados de la opción "Limpieza de registro" y haga clic en Guardar.

Limpieza de troncos a través de phpMyAdmin

Si se siente cómodo con mysql y consultas, este método es más eficiente y más rápido que la herramienta predeterminada de limpieza de registros de Magento. Este método también le permite limpiar lo que quiera, incluso puede limpiar tablas que no están incluidas en la herramienta de limpieza de registros predeterminada de Magento.

Abra la base de datos en phpMyAdmin En el marco derecho, haga clic en las casillas para lo siguiente tabla: dataflow_batch_export

Dataflow_batch_import

Log_customer

Log_quote

Log_summary

Log_summary_type

Log_url

Log_url_info

Log_visitor

Log_visitor_info

Log_visitor_online

Report_viewed_product_index

Report_compared_product_index

Report_event

Busque en la parte inferior de la página, luego haga clic en el cuadro desplegable que dice "con seleccionado" y haga clic en vaciar. Haga clic en Sí en la pantalla de confirmación, y esto truncará todas las tablas seleccionadas.

O puede usar script para ejecutar

TRUNCATE dataflow_batch_export;
TRUNCATE dataflow_batch_import;
TRUNCATE log_customer;
TRUNCATE log_quote;
TRUNCATE log_summary;
TRUNCATE log_summary_type;
TRUNCATE log_url;
TRUNCATE log_url_info;
TRUNCATE log_visitor;
TRUNCATE log_visitor_info;
TRUNCATE log_visitor_online;
TRUNCATE report_viewed_product_index;
TRUNCATE report_compared_product_index;
TRUNCATE report_event;
TRUNCATE index_event;

Tenga en cuenta que estamos aquí para vaciar (Truncar) las tablas seleccionadas no se caen. Ten mucho cuidado cuando hagas esto.

Realizar esto regularmente definitivamente mejorará el rendimiento y la eficiencia de su tienda Magento. También puede configurar scripts para hacer esto automáticamente a intervalos regulares usando "CRON".

 3
Author: JIGNESH,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-03-25 05:39:28

Hay algunas otras tablas que puedes limpiar: documentado aquí: https://dx3webs.com/blog/house-keeping-for-your-magento-database

Espero que esto ayude Andy

 3
Author: Andy,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-12-06 14:24:04

Este script es limpio y ordenado. Configurarlo como un trabajo cron y relajarse:

Http://www.crucialwebhost.com/kb/magneto-log-and-cache-maintenance-script /

 2
Author: mr-euro,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-07-26 15:00:05

Usted puede comprobar buen artículo aquí:

Http://blog.magalter.com/magento-database-size

Tiene instrucciones de cómo comprobar el tamaño de la base de datos, truncar algunas tablas y cómo configurar la limpieza automática de tablas.

 1
Author: freento,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-12-07 21:58:25

Sugerencia adicional: Si no necesita esa información, puede cambiar el Tipo de tabla a "Blackhole" (en lugar de InnoDB). Esto significa que nada se almacenará en el futuro y que las instrucciones insert siguen funcionando bien.

También puede deshabilitar los registros configurando todos los eventos en deshabilitado:

Https://gist.github.com/tegansnyder/189f1c3ce897b4ab494d

 1
Author: Matthias Kleine,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-11-04 09:48:35

Después de limpiar los registros utilizando cualquiera de los métodos descritos anteriormente, también puede deshabilitarlos en su aplicación/etc/local.xml

...
<frontend>
<events>
 <frontend>
  <events>
    <!-- disable Mage_Log -->
    <controller_action_predispatch>
        <observers><log><type>disabled</type></log></observers>
    </controller_action_predispatch>
    <controller_action_postdispatch>
        <observers><log><type>disabled</type></log></observers>
    </controller_action_postdispatch>
    <customer_login>
      <observers>
        <log>
          <type>disabled</type>
        </log>
      </observers>
    </customer_login>
    <customer_logout>
      <observers>
        <log>
          <type>disabled</type>
        </log>
      </observers>
    </customer_logout>
    <sales_quote_save_after>
       <observers>
          <log>
              <type>disabled</type>
          </log>
        </observers>
   </sales_quote_save_after>
   <checkout_quote_destroy>
     <observers>
       <log>
         <type>disabled</type>
       </log>
     </observers>
   </checkout_quote_destroy>
</events>
</frontend>
</config>
 1
Author: diazwatson,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-01-19 14:49:49
SET foreign_key_checks = 0;
TRUNCATE dataflow_batch_export;
TRUNCATE dataflow_batch_import;
TRUNCATE log_customer;
TRUNCATE log_quote;
TRUNCATE log_summary;
TRUNCATE log_summary_type;
TRUNCATE log_url;
TRUNCATE log_url_info;
TRUNCATE log_visitor;
TRUNCATE log_visitor_info;
TRUNCATE log_visitor_online;
TRUNCATE report_viewed_product_index;
TRUNCATE report_compared_product_index;
TRUNCATE report_event;
TRUNCATE index_event;
SET foreign_key_checks = 1;
 1
Author: Martin,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-08-26 08:29:16

Inicie sesión en su panel c ir a phpmyadmin usando SQL run below query para borrar registros

TRUNCATE dataflow_batch_export;
TRUNCATE dataflow_batch_import;
TRUNCATE log_customer;
TRUNCATE log_quote;
TRUNCATE log_summary;
TRUNCATE log_summary_type;
TRUNCATE log_url;
TRUNCATE log_url_info;
TRUNCATE log_visitor;
TRUNCATE log_visitor_info;
TRUNCATE log_visitor_online;
TRUNCATE report_viewed_product_index;
TRUNCATE report_compared_product_index;
TRUNCATE report_event;
TRUNCATE index_event;
 1
Author: Universal Webtech,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-11-13 14:20:44

Cómo se puede hacer la limpieza de registros de Magento tanto manual como automáticamente y otro mantenimiento de la base de datos de Magento. A continuación, las tres cosas son las más importantes de las técnicas de mantenimiento y optimización de la base de datos de Magento;

  • Limpieza de troncos
  • Uso inteligente de las versiones actualizadas de MySQL
  • Configuración del tamaño del grupo de búfer

Para obtener más información http://blog.contus.com/magento-database-maintenance-and-optimization/

 0
Author: Ramesh M,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-11-11 13:18:31

Puede desactivar o establecer la fecha y la hora para la configuración del registro.

Sistema > Configuración > Avanzado > Sistema > Limpieza de registros

 0
Author: Arun Tyagi,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-03-22 12:49:21