Skip to content

Instantly share code, notes, and snippets.

@pkdavies
pkdavies / magento-clean.sql
Created March 4, 2013 15:07
Cleanup Magento database tables, including old quotes that never made it to checkout
USE magentositedb;
TRUNCATE `magento_dataflow_batch_export`;
TRUNCATE `magento_dataflow_batch_import`;
TRUNCATE `magento_log_customer`;
TRUNCATE `magento_log_quote`;
TRUNCATE `magento_log_summary`;
TRUNCATE `magento_log_summary_type`;
TRUNCATE `magento_log_url`;
TRUNCATE `magento_log_url_info`;
@bsalim
bsalim / php speed up tips.html
Created January 3, 2013 09:09
63 Tips for speeding up PHP
<html>
<body>
<p>Here are Webber’s points:</p>
<ul>
<li>If a method can be static, declare it static. Speed improvement is by a factor of 4.</li>
<li>echo is faster than print.(<em>* compare with list from phplens by John Lim</em>)</li>
<li>Use echo’s multiple parameters instead of string concatenation.</li>
<li>Set the maxvalue for your for-loops before and not in the loop.</li>
<li>Unset your variables to free memory, especially large arrays.</li>
<li>Avoid magic like __get, __set, __autoload</li>
@petemcw
petemcw / magento_sql_snippets.md
Created July 21, 2011 19:41
Magento SQL Snippets

Magento SQL Snippets

Clear Temporary Data Tables

TRUNCATE `log_customer`;
TRUNCATE `log_quote`;
TRUNCATE `log_summary`;
TRUNCATE `log_url`;
TRUNCATE `log_url_info`;