Skip to content

Instantly share code, notes, and snippets.

View tzyganu's full-sized avatar

Marius Strajeru tzyganu

View GitHub Profile
@avoelkl
avoelkl / gist:49563c516d6cb318eb34
Last active June 5, 2024 12:41
Non-blocking and quick database dumps for large databases

How-to

Add --single-transaction and --quick to your mysqldump command.

--single-transaction

sets the isolation mode to REPEATABLE READ and starts a transaction before dumping data. useful for InnoDB tables, dumps the consistent state without blocking any applications.

--quick

@Vinai
Vinai / example.php
Created June 20, 2014 08:34
Loading individual attribute values on catalog/product instances.
<?php
require('htdocs/app/Mage.php');
umask(0);
Mage::setIsDeveloperMode(true);
Mage::app();
$attributeCode = 'description'; // any attribute code
// load model without only static attribute values