# Drupal Performance Tip – 'I’m too young to die' – know your DB engines — Liran Tal

MyISAM or InnoDB? know how to choose database engines

Canonical: https://lirantal.com/blog/2014-12-15

![Cover artwork for Drupal Performance Tip – 'I’m too young to die' – know your DB engines](/_astro/photo-1468956398224-6d6f66e22c35.BePqp3CW_Zj88Tk.jpg)

In the spirit of the computer video game [Doom](http://doom.wikia.com/wiki/Doom) and its [skill levels](http://doom.wikia.com/wiki/Skill_level), we’ll review a few ways you can improve your [Drupal](http://drupal.org/) speed performance and optimize for better results and server response time. These tips that we’ll cover may be at times specific to Drupal 6 versions, although you can always learn the best practices from these examples and apply them on your own code base.

![Doom](https://web.archive.org/web/20150211095044im_/http://adamatomic.com/pics/blog/doom/doom2.jpg)

[Drupal](http://drupal.org/) 6 shipped with all tables being [MyISAM](http://drupal.stackexchange.com/questions/20893/drupal-database-innodb-or-myisam), and then Drupal 7 changed all that and shipped with all of its tables using the [InnoDB](http://drupal.stackexchange.com/questions/20893/drupal-database-innodb-or-myisam) database engine. Each one with its own [strengths and weaknesses](https://www.drupal.org/node/1553474) but it’s quite clear that `InnoDB` will probably perform better for your Drupal site (though it has quite a bit of fine tuning configuration to be tweaked on my.cnf).

Some modules, whether on Drupal 6, or those on Drupal 7 that simply upgraded but didn’t quite review all of their code, might ship with queries like [SELECT COUNT() which if you have migrated your tables to InnoDB (or simply using Drupal 7) then this will hinder on database performance](http://www.percona.com/blog/2006/12/01/count-for-innodb-tables/). That’s mainly because `InnoDB` and `MyISAM` work differently, and where-as this proved as quite a fast responding query being executed on a `MyISAM` database which uses the main index to store this information, for `InnoDB` the situation is different and will result in doing a full table scan for the count. Obviously, on an `InnoDB` configuration running such queries on large tables will result in very poor performance

[![drupal\_perf-5](https://web.archive.org/web/20150211095044im_/http://enginx.com/wp-content/uploads/2014/11/drupal_perf-5.png)](http://enginx.com/wp-content/uploads/2014/11/drupal_perf-5.png)

Note to ponder upon – what about the Views module which uses similar type of `COUNT()` queries to create the pagination for its views?

## More writing

[All writing](/blog)

*   Sep 5, 2026

    ### [Self-Hosting Hermes Agent with Matrix E2EE on Proxmox](/blog/self-host-hermes-agent-matrix-e2ee-proxmox)

*   Aug 2, 2026

    ### [The Practical Second Brain: Building an LLM-Operated Markdown Knowledge Graph](/blog/practical-second-brain-llm-markdown-knowledge-graph)

*   Aug 1, 2026

    ### [Building a Second Brain with LLMs and AI Agents](/blog/building-second-brain-llms-ai-agents)


* * *

Liran Tal is the author of the book [Node.js Secure Coding: Defending Against Command Injection Vulnerabilities](https://www.nodejs-security.com/)

[Start Building Secure Node.js Applications](https://www.nodejs-security.com/)

 [![](/_astro/nodejs-secure-coding-book-3d-style.DiTWpzFs_Z3c7s1.png)](https://www.nodejs-security.com/)
