[Magento] Various tips

Disable log tables usage

If you already have an external “profiling” tool you can trash the content of several magento table like:

  • log_customer
  • log_quote
  • log_summary
  • log_summary_type
  • log_url
  • log_url_info
  • log_visitor
  • log_visitor_info
  • log_visitor_online

and replace the engine for them by ‘blackhole’. This will significantly improves performance.
You can find more info on the subject here.

Directories and NFS

The following directories can be shared inside NFS share:

  • var/cache
  • var/locks
  • var/media
  • var/exports

It recommended to not put var/report and var/logs inside.

SQL request for finding the number of order

mysql> select count(*), date_format(updated_at, '%Y%m%d %H') as datum from sales_flat_order where created_at > '2013-11-20' group by datum ;