Created
January 15, 2014 13:59
-
-
Save gwillem/8436730 to your computer and use it in GitHub Desktop.
Magento url indexer partitioning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
CONCAT(r.identifier, CASE WHEN ur.inc IS NULL OR `m`.`value` = 1 THEN '' ELSE CONCAT('-', ur.inc) END) AS `request_path`, | |
`r`.`target_path`, | |
'3beb48718b9de2b903447079560756bc' AS `guid`, | |
0 AS `is_system`, | |
CONCAT(r.identifier, CASE WHEN ur.inc IS NULL OR `m`.`value` = 1 THEN '' ELSE CONCAT('-', ur.inc) END) AS `identifier`, | |
`r`.`redirect_id` AS `value_id`, | |
`r`.`store_id`, 1 AS `entity_type` | |
FROM `enterprise_url_rewrite_redirect` AS `r` | |
LEFT JOIN `enterprise_url_rewrite` AS `ur` ON ur.identifier = r.identifier AND ur.store_id = r.store_id AND ur.entity_type = 1 | |
LEFT JOIN `enterprise_index_multiplier` AS `m` ON ur.identifier IS NOT NULL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment