SQL for updating the line count cache
fix SQL thinkos