# 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_2dhsyH.webp)

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)

*   Nov 26, 2026

    ### [Complete Guide: Setting Up gogcli - Google APIs in Your Terminal](/blog/gogcli-setup-guide-for-google-apis-and-openclaw-personal-assistant-ai)

*   Nov 23, 2026

    ### [5 Steps to Refactor a Fastify App for Testing and Growth](/blog/refactor-fastify-app-testing-growth)

*   Nov 14, 2026

    ### [Every Security Weakness Matters When Vulnerability Chaining is King](/blog/every-security-weakness-matters-vulnerability-chaining)


* * *

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.CGE-cDF3_1NNN99.png)](https://www.nodejs-security.com/)
