DrupalDatabaseCache is causing performance issues I have devel query log / page execution time enabled on my site and most of the queries which are slowing down my site are related to DrupalDatebaseCache.


  DrupalDatabaseCache::set


Sample Query : 


  UPDATE cache SET serialized=:db_update_placeholder_0,
  created=:db_update_placeholder_1, expire=:db_update_placeholder_2,
  data=:db_update_placeholder_3 WHERE ( (cid =
  :db_condition_placeholder_0) )
  
  INSERT INTO cache_menu (cid, serialized, created, expire, data) VALUES
  (:db_insert_placeholder_0, :db_insert_placeholder_1,
  :db_insert_placeholder_2, :db_insert_placeholder_3,
  :db_insert_placeholder_4)


Any clue what drupal is doing with caching and how to minimize it .
thanks

####Update####

I installed Memcache but still DrupalDatabaseCache calls are being made which is making the site slow .
If you concerned with performance then you want to maximise caching, not minimise it!

Caching is used to store data once expensive (time consuming) processes have been used to prepare it. Then future page requests simply return the cached data and don't have to do the slow processing again.

By default Drupal stores it's cache in the database but as you've spotted this isn't always that fast. Using a module like APC or memcache allows you to store the cache in the servers memory, as opposed to having to write it to the DB so this is much faster.

To make the most of Druapl's caching functions I would also recommend taking a read of lullabot's excellent article: A Beginner's Guide to Caching Data in Drupal 7