Hacking with PHP has been updated for PHP 7 - click here! >>


One key area open to optimisation is data duplication. Very often data is duplicated across rows, for example as row might contain Person A works at Company A, whose address is BigLongAddressHere. Person B also works at Company A, whose address is still BigLongAddressHere. Person C also works at.... etc. In this situation there are many people who work at the same place, but the company address is duplicated in the row of each staff member. What happens if the company changes address? Worse, think of all the drive space that is being wasted needlessly!


If this was helpful, please take a moment to tell others about Hacking with PHP by tweeting about it!

Next chapter: Upgrade MySQL >>

Previous chapter: Make sure your indexes are being used

Jump to:


Home: Table of Contents

Copyright ©2015 Paul Hudson. Follow me: @twostraws.