20
Feb
Feb
Drupal can grow quite big in terms of database sizes. In a regular day, we often backup Drupal databases several times per day. There are many reasons we want to keep the size lower:
- Easier to export if the size is smaller
- Easier to transfer to another server, less expensive (less traffic), less wasted time
- Easier to import to the new server (takes way less time to import a 14 Mb database than a 200 Mb one)
- Takes less storage on the Development server
Our solution
Truncate as many tables as possible. There is plenty of information available in the MySQL database that we don't need to transport to another server. It's usually information relevant only for the current state of our application.- Truncate the following tables:
- Everything that starts with cache_ (cache, cache_block, cache_bootstrap) - here you actually have most of the data
- sessions
- watchdog
- semaphore
- Archive your database. Making a tar.gz out of your .sql dump can drastically reduce it's size. You should never transport plain .sql files.
You should now have at least half the size of your initial database dump.
Optimising your Drupal
If you want to take this any further you can optimise your Drupal for less MySQL usage and better performance.
I will prepare a new article on performance concerns of Drupal. Mainly you should consider removing Revision system, using a Memory cache backend instead of MySQL cache backend, using plain cache module like Boost to limit the number of MySQL queries on your server.
Category View
Tags
activities
Aggregation
amazon
android
apache
API
appcelerator
application
assistant manager
backup
balance
brand recognition
business days
cache
camp
coding standards
command
commerce
community
context
cURL
customer engagement
customer portal
database
data integrity
deployment
developer
Drupal
drupal 7
drupal 8
Drupal Camp
Drupal Core
Drupal development
Drupal solution
Drush
e-commerce
events
filter
front-end developer
game
games
general
git
Global Training
google maps
integration
ios
job
Job fairs
jobs
kpi
maintenance
manual testing
memcache
mobile
mobile app
mobile application
mobile development
Module
modules
mysql
open source
Panels
performance
php
php developer
plans
project
project manager
promotion
qa
Quality Assurance
redis
registry
Relation
release candidate
remote team
responsibilities
responsive
screen resolutions
Scrum
Security
server
Services
session
skills
software
software testing
sprint
stock management system
studio
support
Targul de Cariere
team
team building
teambuilding
teamwork
testing
titanium
tutorial
Târgul de Cariere in IT
Unit Testing
update
Updates
usability
user experience
varnish
Views
Views Handler
web application
web application testing
web development
webservice
webshop
website usability