Scaling Magento presentation with 60 slides and notes, which was then reviewed by Alan Storm.
# ######################################################################## | |
# api2_acl_attribute | |
# ######################################################################## | |
# IDX_API2_ACL_ATTRIBUTE_USER_TYPE is a left-prefix of UNQ_API2_ACL_ATTRIBUTE_USER_TYPE_RESOURCE_ID_OPERATION | |
# Key definitions: | |
# KEY `IDX_API2_ACL_ATTRIBUTE_USER_TYPE` (`user_type`) | |
# UNIQUE KEY `UNQ_API2_ACL_ATTRIBUTE_USER_TYPE_RESOURCE_ID_OPERATION` (`user_type`,`resource_id`,`operation`), | |
# Column types: | |
# `user_type` varchar(20) not null comment 'type of user' |
-- MySQL dump 10.13 Distrib 5.5.34, for osx10.6 (i386) | |
-- | |
-- Host: localhost Database: magento-virgin | |
-- ------------------------------------------------------ | |
-- Server version 5.5.34 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8 */; |
After I have seen that some 3rd party modules duplicate the core_url_rewrite
table to store there additional category rewrite information in it (1), I came to the conclusion that it should be save to remove the joinLeft()
in the flat table classes.
Instead of the joinLeft()
you simply refer to the column main_table.url_path as request_path
in the tables catalog_category_flat_store_[StoreId]
. Please see the new methods.
Downside: To get the correct rewrites in the frontend you need to run the reindex for catalog_category_flat
. During this reindex the correct rewrites will be inserted into the column catalog_category_flat_store_X.url_path
.
Footnotes:
(1) the join with the core_url_rewrite
takes for large product collection really long when you only need the correct rewrite for the categories. This can save per request around ~0.Xsec.
<?php | |
class Zookal_Core_Helper_Data extends Mage_Core_Helper_Abstract | |
{ | |
private $_objectCache = []; | |
public function getCollectionSingleton($modelClass, array $collectionOptions = null, $cacheKey = null) | |
{ | |
$cacheKey = null === $cacheKey ? $modelClass . '/' . json_encode($collectionOptions) : (string)$cacheKey; | |
// $cacheKey = md5($cacheKey); if preferred |
- Nginx 1.4
- PHP 5.5 FPM
Clicking on one of the Reindex Data links executes the reindex process and immediately shows the URL from action preReindexProcess()
but clicking on that link to initiate a new request takes as long as it takes to wait for the reindexing.
So something is still using the same connection and waits to finish the previous request. How to initiate a new request without waiting for the previous one?
DELETE FROM catalog_category_entity_datetime WHERE `value` IS NULL; | |
DELETE FROM catalog_category_entity_decimal WHERE `value` IS NULL; | |
DELETE FROM catalog_category_entity_int WHERE `value` IS NULL; | |
DELETE FROM catalog_category_entity_text WHERE `value` IS NULL; | |
DELETE FROM catalog_category_entity_varchar WHERE `value` IS NULL; | |
DELETE FROM catalog_product_entity_datetime WHERE `value` IS NULL; | |
DELETE FROM catalog_product_entity_decimal WHERE `value` IS NULL; | |
DELETE FROM catalog_product_entity_gallery WHERE `value` IS NULL; | |
DELETE FROM catalog_product_entity_group_price WHERE `value` IS NULL; |
UPDATE `customer_entity` | |
SET `email` = concat('test+', entity_id, '@aGmailDomain.com'); | |
UPDATE `customer_entity_varchar` | |
SET `value` = CONCAT(MD5(concat('qXpassword', entity_id)), ':qX') | |
WHERE `attribute_id` = 12; | |
UPDATE `sales_flat_order` | |
SET customer_email = concat('test+', IFNULL(customer_id, entity_id), '@aGmailDomain.com'); |
#!/bin/sh | |
# location of the php binary | |
if [ ! "$1" = "" ] ; then | |
CRONSCRIPT=$1 | |
else | |
CRONSCRIPT=cron.php | |
fi | |
MODE="" | |
if [ ! "$2" = "" ] ; then |
HTTPS: Requests per second: 89.07 [#/sec] (mean)
HTTP: Requests per second: 4622.12 [#/sec] (mean)
Be aware: https://twitter.com/jessemcnelis/status/508456580384178178