jan_cafourek Posted November 22, 2017 Share Posted November 22, 2017 Zdravím, na PS 1.4.x bylo vše OK, po aktualizaci na PS 1.6.1.17 trvá až několik minut uložení nového produktu. Po zapnutí profilování mi vyskočila šílená čísla. Nevíte někdo kde hledat chybu? Strašně dlouho trvá onen postProccess, avšak nevím proč a jak to případně zrychlit. Load Time 311920 ms - You'd better run your shop on a toaster Querying Time 311424 ms Queries 124 Memory Peak Usage 22.4 Mb Included Files 149 files - 4.30 Mb PrestaShop Cache - Mb Global vars 1.77 Mb PrestaShop Version 1.6.1.17 PHP Version 5.6.32-1+0~20171027135529.7+stretch~1.gbpd60169 (OK) MySQL Version 10.1.26-MariaDB-0+deb9u1 (OK) Memory Limit 1024M Max Execution Time 10000s Smarty Cache enabled Smarty Compilation auto Time Cumulated Time Memory Usage Memory Peak Usage config 57 ms 57 ms 8.57 Mb 10.36 Mb __construct 0 ms 57 ms - Mb 10.36 Mb init 157 ms 213 ms 2.95 Mb 11.77 Mb checkAccess 0 ms 213 ms - Mb 11.77 Mb setMedia 4 ms 217 ms 0.07 Mb 11.83 Mb postProcess 311530ms 311747 ms 6.19 Mb 17.98 Mb initHeader 134 ms 311881 ms 3.23 Mb 21.26 Mb initContent 38 ms 311919 ms 1.16 Mb 22.45 Mb initFooter 1 ms 311920 ms 0.04 Mb 22.45 Mb Hook Time Memory Usage __construct 12 ms 4.75 Mb hookaddproduct 3 ms - Mb hookbackofficeheader 0 ms - Mb hookdisplayBackOfficeHeader - ms - Mb 4 hooks 16 ms 4.75 Mb Module Time Memory Usage homefeatured 3 ms - Mb zbozi 2 ms 0.25 Mb autoupgrade 2 ms 0.75 Mb cronjobs 2 ms 0.25 Mb themeconfigurator 1 ms 0.50 Mb spthemeconfigurator 1 ms 1.75 Mb productscategory 1 ms 0.25 Mb spsearchpro 1 ms 0.50 Mb salemanufacturer 1 ms - Mb salecategory 1 ms 0.25 Mb spblocktags 1 ms - Mb spmegamenu 0 ms - Mb spverticalmenu 0 ms 0.25 Mb plblog 0 ms - Mb 14 modules 16 ms 4.75 Mb Link to comment Share on other sites More sharing options...
jan_cafourek Posted November 22, 2017 Author Share Posted November 22, 2017 Došel jsem níže v SQL dotazech k tomu, že přes 300 000 ms trval dotaz ze soubory Classes/Tag.php DELETE FROM `ps_tag` WHERE NOT EXISTS (SELECT 1 FROM ps_product_tag WHERE ps_product_tag.id_tag = ps_tag.id_tag) v tabulce ps_tag je 9 365 řádků a v tabulce ps_product_tag je 53 952 řádků. Více nevím co s tím. Prosím o pomoc. Link to comment Share on other sites More sharing options...
tuk66 Posted November 23, 2017 Share Posted November 23, 2017 Jako kdyby ty dvě tabulky neměly indexy. CREATE TABLE IF NOT EXISTS `ps_tag` ( `id_tag` int(10) unsigned NOT NULL AUTO_INCREMENT, `id_lang` int(10) unsigned NOT NULL, `name` varchar(32) NOT NULL, PRIMARY KEY (`id_tag`), KEY `tag_name` (`name`), KEY `id_lang` (`id_lang`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ; CREATE TABLE IF NOT EXISTS `ps_product_tag` ( `id_product` int(10) unsigned NOT NULL, `id_tag` int(10) unsigned NOT NULL, `id_lang` int(10) unsigned NOT NULL, PRIMARY KEY (`id_product`,`id_tag`), KEY `id_tag` (`id_tag`), KEY `id_lang` (`id_lang`,`id_tag`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now