Level 2
put index on likes_count, slow insert updates will be almost unseen by user.
Hey folks,
I have a Laravel app that contains table posts and an inside column "likes_count" that represents the number of likes for each post. I have a task to get the top 20 post orders by the number of likes, and I am confused should I set the index on that column, because that column is changed for every post every second while users like posts? Should I set the index on frequently changed column or continue without index because it will slow insert updates etc?
Please or to participate in this conversation.