Update lessons-learned-0514.sql

Added new changes to reflect an optimization for performance as the first idea was very slow.