The below queries taking more time time execute in db i want to know to why these are executing.if these are executing also then taking more time.can we stop to execute these queries due to that my site is always going down on frequent basis.kindly provide anybody solution on priority basis.

Query_time: 30.124537

INSERT INTO cache_category (cid, data, created, expire, headers, serialized) VALUES ('gcmenu_tree_all_dataprimary-links:3777::anonymous user', 'a:1:{s:53:\"cmenu_tree_all_dataprimary-links:3777::anonymous user\";s:37455:\"a:8:{s:17:\"49950 Apparel 274\";a:2:{s:4:\"link\";a:40:{s:14:\"load_functions\";s:26:\"a:1:{i:1;s:9:\"node_load\";}\";s:16:\"to_arg_functions\";s:0:\"\";s:15:\"access_callback\";s:11:\"node_access\";s:16:\"access_arguments\";s:29:\"a:2:{i:0;s:4:\"view\";i:1;i:1;}\";s:13:\"page_callback\";s:14:\"node_page_view\";s:14:\"page_arguments\";s:14:\"a:1:{i:0;i:1;}\";s:5:\"title\";s:7:\"Apparel\";s:14:\"title_callback\";s:15:\"node_page_title\";s:15:\"title_arguments\";s:14:\"a:1:{i:0;i:1;}\";s:4:\"type\";s:1:\"4\";s:11:\"description\";s:0:\"\";s:9:\"menu_name\";s:13:\"primary-links\";s:4:\"mlid\";s:3:\"274\";s:4:\"plid\";s:1:\"0\";s:9:\"link_path\";s:6:\"node/4\";s:11:\"router_path\";s:6:\"node/%\";s:10:\"link_title\";s:7:\"Apparel\";s:7:\"options\";a:0:{}s:6:\"module\";s:13:\"category_menu\";s:6:\"hidden\";s:1:\"0\";s:8:\"external\";s:1:\"0\";s:12:\"has_children\";s:1:\"1\";s:8:\"expanded\";s:1:\"1\";s:6:\"weight\";s:3:\"-50\";s:5:\"depth\";s:1:\"1\";s:10:\"customized\";s:1:\"1\";s:2:\"p1\";s:3:\"274\";s:2:\"p2\";s:1:\"0\";s:2:\"p3\";s:1:\"0\";s:2:\"p4\";s:1:\"0\";s:2:\"p5\";s:1:\"0\";s:2:\"p6\";s:1:\"0\";s:2:\"p7\";s:1:\"0\";s:2:\"p8\";s:1:\"0\";s:2:\"p9\";s:1:\"0\";s:7:\"updated\";s:1:\"0\";s:15:\"in_active_trail\";b:0;s:6:\"access\";b:1;s:4:\"href\";s:6:\"node/4\";s:17:\"localized_options\";a:0:{}}s:5:\"below\";b:0;}s:20:\"49951 Automotive 301\";a:2:{s:4:\"link\";a:40:{s:14:\"load_functions\";s:26:\"a:1:{i:1;s:9:\"node_load\";}\";s:16:\"to_arg_functions\";s:0:\"\";s:15:\"access_callback\";s:11:\"node_access\";s:16:\"access_arguments\";s:29:\"a:2:{i:0;s:4:\"view\";i:1;i:1;}\";s:13:\"page_callback\";s:14:\"node_page_view\";s:14:\"page_arguments\";s:14:\"a:1:{i:0;i:1;}\";s:5:\"title\";s:10:\"Automotive\";s:14:\"title_callback\";s:15:\"node_page_title\";s:15:\"title_arguments\";s:14:\"a:1:{i:0;i:1;}\";s:4:\"type\";s:1:\"4\";s:11:\"description\";s:0:\"\";s:9:\"menu_name\";s:13:\"primary-links\";s:4:\"mlid\";s:3:\"301\";s:4:\"plid\";s:1:\"0\";s:9:\"link_path\";s:7:\"node/19\";s:11:\"router_path\";s:6:\"node/%\";s:10:\"link_title\";s:10:\"Automotive\";s:7:\"options\";a:0:{}s:6:\"module\";s:13:\"category_menu\";s:6:\"hidden\";s:1:\"0\";s:8:\"external\";s:1:\"0\";s:12:\"has_children\";s:1:\"1\";s:8:\"expanded\";s:1:\"1\";s:6:\"weight\";s:3:\"-49\";s:5:\"depth\";s:1:\"1\";s:10:\"customized\";s:1:\"1\";s:2:\"p1\";s:3:\"301\";s:2:\"p2\";s:1:\"0\";s:2:\"p3\";s:1:\"0\";s:2:\"p4\";s:1:\"0\";s:2:\"p5\";s:1:\"0\";s:2:\"p6\";s:1:\"0\";s:2:\"p7\";s:1:\"0\";s:2:\"p8\";s:1:\"0\";s:2:\"p9\";s:1:\"0\";s:7:\"updated\";s:1:\"0\";s:15:\"in_active_trail\";b:0;s:6:\"access\";b:1;s:4:\"href\";s:7:\"node/19\";s:17:\"localized_options\";a:0:{}}s:5:\"below\";b:0;}s:21:\"49952 Engineering 288\";a:2:{s:4:\"link\";a:40:{s:14:\"load_functions\";s:26:\"a:1:{i:1;s:9:\"node_load\";}\";s:16:\"to_arg_functions\";s:0:\"\";s:15:\"access_callback\";s:11:\"node_access\";s:16:\"access_arguments\";s:29:\"a:2:{i:0;s:4:\"view\";i:1;i:1;}\";s:13:\"page_callback\";s:14:\"node_page_view\";s:14:\"page_arguments\";s:14:\"a:1:{i:0;i:1;}\";s:5:\"title\";s:11:\"Engineering\";s:14:\"title_callback\";s:15:\"node_page_title\";s:15:\"title_arguments\";s:14:\"a:1:{i:0;i:1;}\";s:4:\"type\";s:1:\"4\";s:11:\"description\";s:0:\"\";s:9:\"menu_name\";s:13:\"primary-links\";s:4:\"mlid\";s:3:\"288\";s:4:\"plid\";s:1:\"0\";s:9:\"link_path\";s:7:\"node/12\";s:11:\"router_path\";s:6:\"node/%\";s:10:\"link_title\";s:11:\"Engineering\";s:7:\"options\";a:0:{}s:6:\"module\";s:13:\"category_menu\";s:6:\"hidden\";s:1:\"0\";s:8:\"external\";s:1:\"0\";s:12:\"has_children\";s:1:\"1\";s:8:\"expanded\";s:1:\"1\";s:6:\"weight\";s:3:\"-48\";s:5:\"depth\";s:1:\"1\";s:10:\"customized\";s:1:\"1\";s:2:\"p1\";s:3:\"288\";s:2:\"p2\";s:1:\"0\";s:2:\"p3\";s:1:\"0\";s:2:\"p4\";s:1:\"0\";s:2:\"p5\";s:1:\"0\";s:2:\"p6\";s:1:\"0\";s:2:\"p7\";s:1:\"0\";s:2:\"p8\";s:1:\"0\";s:2:\"p9\";s:1:\"0\";s:7:\"updated\";s:1:\"0\";s:15:\"in_active_trail\";b:0;s:6:\"access\";b:1;s:4:\"href\";s:7:\"node/12\";s:17:\"localized_options\";a:0:{}}s:5:\"below\";b:0;}s:17:\"49953 Medical 300\";a:2:{s:4:\"link\";a:40:{s:14:\"load_functions\";s:26:\"a:1:{i:1;s:9:\"node_load\";}\";s:16:\"to_arg_functions\";s:0:\"\";s:15:\"access_callback\";s:11:\"node_access\";s:16:\"access_arguments\";s:29:\"a:2:{i:0;s:4:\"view\";i:1;i:1;}\";s:13:\"page_callback\";s:14:\"node_page_view\";s:14:\"page_arguments\";s:14:\"a:1:{i:0;i:1;}\";s:5:\"title\";s:7:\"Medical\";s:14:\"title_callback\";s:15:\"node_page_title\";s:15:\"title_arguments\";s:14:\"a:1:{i:0;i:1;}\";s:4:\"type\";s:1:\"4\";s:11:\"description\";s:0:\"\";s:9:\"menu_name\";s:13:\"primary-links\";s:4:\"mlid\";s:3:\"300\";s:4:\"plid\";s:1:\"0\";s:9:\"link_path\";s:7:\"node/18\";s:11:\"router_path\";s:6:\"node/%\";s:10:\"link_title\";s:7:\"Medical\";s:7:\"options\";a:0:{}s:6:\"module\";s:13:\"category_menu\";s:6:\"hidden\";s:1:\"0\";s:8:\"external\";s:1:\"0\";s:12:\"has_children\";s:1:\"1\";s:8:\"expanded\";s:1:\"1\";s:6:\"weight\";s:3:\"-47\";s:5:\"depth\";s:1:\"1\";s:10:\"customized\";s:1:\"1\";s:2:\"p1\";s:3:\"300\";s:2:\"p2\";s:1:\"0\";s:2:\"p3\";s:1:\"0\";s:2:\"p4\";s:1:\"0\";s:2:\"p5\";s:1:\"0\";s:2:\"p6\";s:1:\"0\";s:2:\"p7\";s:1:\"0\";s:2:\"p8\";s:1:\"0\";s:2:\"p9\";s:1:\"0\";s:7:\"updated\";s:1:\"0\";s:15:\"in_active_trail\";b:0;s:6:\"access\";b:1;s:4:\"href\";s:7:\"node/18\";s:17:\"localized_options\";a:0:{}}s:5:\"below\";b:0;}s:33:\"49954 Building & Construction 303\";a:2:{s:4:\"link\";a:40:{s:14:\"load_functions\";s:26:\"a:1:{i:1;s:9:\"node_load\";}\";s:16:\"to_arg_functions\";s:0:\"\";s:15:\"access_callback\";s:11:\"node_access\";s:16:\"access_arguments\";s:29:\"a:2:{i:0;s:4:\"view\";i:1;i:1;}\";s:13:\"page_callback\";s:14:\"node_page_view\";s:14:\"page_arguments\";s:14:\"a:1:{i:0;i:1;}\";s:5:\"title\";s:23:\"Building & Construction\";s:14:\"title_callback\";s:15:\"node_page_title\";s:15:\"title_arguments\";s:14:\"a:1:{i:0;i:1;}\";s:4:\"type\";s:1:\"4\";s:11:\"description\";s:0:\"\";s:9:\"menu_name\";s:13:\"primary-links\";s:4:\"mlid\";s:3:\"303\";s:4:\"plid\";s:1:\"0\";s:9:\"link_path\";s:7:\"node/21\";s:11:\"router_path\";s:6:\"node/%\";s:10:\"link_title\";s:23:\"Building & Construction\";s:7:\"options\";a:0:{}s:6:\"

Query_time: 6.132237

INSERT INTO cache_category (cid, data, created, expire, headers, serialized) VALUES ('n3590', 'a:1:{s:25:\"cat_node_get_cats3590:cid\";s:6:\"a:0:{}\";}', 1349934933, 0, '', 1);

Query_time: 10.392684

INSERT INTO cache_category (cid, data, created, expire, headers, serialized) VALUES ('n8331', 'a:1:{s:25:\"cat_node_get_cats8331:cid\";s:6:\"a:0:{}\";}', 1349935101, 0, '', 1);

Query_time: 11.199644
INSERT INTO cache_menu (cid, data, created, expire, headers, serialized) VALUES ('category-menu-trail-links:primary-links:all-cid:6336', 'category-menu-trail-links:primary-links:tree-data:e413fea325d97cafc31d1ce4f0c07910', 1349935101, 0, '', 0);

Comments

rbayliss’s picture

Project: Drupal core » Category
Version: 6.20 » master
Component: cache system » Code

This cache is provided and used by the category module, not Drupal core. Moving to the category module's issue queue. Taking a guess on the version, because it won't let me submit this form without specifying.

Anonymous’s picture

Project: Category » Drupal core
Version: master » 6.20
Component: Code » cache system
Priority: Critical » Normal
Status: Needs work » Fixed

These caches are meant to make your system speedier. It may be that your system is undersized for Drupal. The amount of time it takes to do the insert into the DB is solely dependent on the DB engine configurations. You should spend some time researching how to configure your DB to make it more responsive within the parameters of your server.

Anonymous’s picture

Project: Drupal core » Category
Version: 6.20 » master
Component: cache system » Code
Status: Fixed » Active

Same time posting issue. Recorrected the meta data.

imartest’s picture

Thanks for replying me i checked for two table engines one is for cache_menu and cache_category both using InnoDB engine.The Queries which in shared is generated from slow query logs.kindly suggest me if there is any other solutions for this problem.